diff --git a/lib/WebGUI/Macro.pm b/lib/WebGUI/Macro.pm index 77f2a21a5..26971ed71 100644 --- a/lib/WebGUI/Macro.pm +++ b/lib/WebGUI/Macro.pm @@ -257,6 +257,16 @@ sub _transformMacro { }); } +=head2 quote ($text) + +Escape backslashes and single quotes, and then return the text wrapped in single quotes. + +=head3 $text + +Text to quote. + +=cut + sub quote { my $text = shift; $text =~ s/([\\'])/\\$1/g;