Bug #4699 [NEW]: Needs to mention backslash-output behaviour
| From: | sr at baghus dot net | Date: | Wed, 29 Jun 2005 06:44:14 +0000 |
| Subject: | Bug #4699 [NEW]: Needs to mention backslash-output behaviour | ||
| Groups: | php.pear.doc | ||
| Request: | Send a blank email to pear-doc+get-6406@lists.php.net to get a copy of this message | ||
From: sr at baghus dot net
Operating system: Linux
PHP version: 4.3.11
Package: Documentation
Bug Type: Bug
Bug description: Needs to mention backslash-output behaviour
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 -> \.
--
Edit bug report at http://pear.php.net/bugs/bug.php?id=4699&edit=1
--