diff options
author | schnetter <schnetter@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2004-08-20 08:05:23 +0000 |
---|---|---|
committer | schnetter <schnetter@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2004-08-20 08:05:23 +0000 |
commit | b9d9efd47d4071adb28e58338c562f7b036e307f (patch) | |
tree | 65547fb8c5bffc6b5a76c88352bcbdc0e14d5273 /lib | |
parent | 9c37cbbe034ca616b9ba62f555faa1f121f93f4e (diff) |
Escape percent signs for latex.
Do not escape backslash-quote any more, because this sequence cannot
be created.
Add comments stating that it does not make sense to change the case of
strings after they have been cleaned for latex.
Do not fix the places where this happens, because things seem to work
and a release is imminent. Submitted PR 1832.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@3850 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'lib')
-rw-r--r-- | lib/sbin/ThornUtils.pm | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/lib/sbin/ThornUtils.pm b/lib/sbin/ThornUtils.pm index 8cf491b9..d08b6b69 100644 --- a/lib/sbin/ThornUtils.pm +++ b/lib/sbin/ThornUtils.pm @@ -344,6 +344,8 @@ sub EndDocument # @desc # Cleans up our values so that latex will not give us errors. # $val = &CleanForLatex($val); +# Note: Do not call ToLower or ToUpper on the result; instead, +# transform before you clean for Latex. # @enddesc # @calls # @calledby @@ -383,11 +385,8 @@ sub CleanForLatex # escape & $val =~ s/\&/\\\&/g; - - # UNescape " - # latex gets very angry when it sees: \" - # so we are replacing it with: " - $val =~ s/\\\"/\"/g; + # escape % + $val =~ s/%/\\%/g; return $val; } @@ -399,6 +398,8 @@ sub CleanForLatex # @desc # Takes a value, uppercases the first letter and lowercases all others # $val = &Translate($val); +# Note: Do not call this routine on a result of CleanForLatex; instead, +# transform before you clean for Latex. # @enddesc # @calls # @calledby @@ -428,6 +429,8 @@ sub Translate # @desc # Translates values passed in to upper case and returns it # $val = &ToUpper($val); +# Note: Do not call this routine on a result of CleanForLatex; instead, +# transform before you clean for Latex. # @enddesc # @calls # @calledby @@ -451,6 +454,8 @@ sub ToUpper # @desc # Translates values passed in to lower case and returns it # $val = &ToLower($val); +# Note: Do not call this routine on a result of CleanForLatex; instead, +# transform before you clean for Latex. # @enddesc # @calls # @calledby |