Home » HTML » HTML_Template_IT » Bug #4699
Needs to mention backslash-output behaviour
Details
| Submitted | 2005-06-29 06:44 UTC |
|---|---|
| From | sr at baghus dot net |
| Assigned | pajoye |
| Status | Bogus |
| Package | HTML_Template_IT |
| PHP Version | 4.3.11 |
| OS | Linux |
| Roadmaps | (Not assigned) |
Comments
[2005-06-29 06:44 UTC] sr at baghus dot net
Description:
------------
The template system needs "\\\$" to print out "\$" instead of "\\$" as needed by phps echo.
Furthermore, this is only the case with $. Other backslashified characters will output just fine: "\." outputs as "\.", no need for double or tripple backslashes.
This bit me while making and editor for regular expressions... \$ in the ruleset was always transformed to $ and the perl code evaluating the regexps died.
This happens with HTML-Template-IT version 1.10.
Reproduce code:
---------------
$template->setVariable( 'test1', "\$" );
$template->setVariable( 'test2', "\\$" );
$template->setVariable( 'test3', "\\\$" );
$template->setVariable( 'test4', "\." );
Expected result:
----------------
test1 -> $
test2 -> \$
test3 -> \\$
test4 -> .
Actual result:
--------------
test1 -> $
test2 -> $
test3 -> \$
test4 -> \.