Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.4.0

Bug #1840 stripslashes needed in _buildFunctionlist()
Submitted: 2004-07-11 02:25 UTC
From: spam at nickm dot org Assigned: avb
Status: Closed Package: HTML_Template_Sigma
PHP Version: 4.3.7 OS: FreeBSD
Roadmaps: (Not assigned)    
Subscription  


 [2004-07-11 02:25 UTC] spam at nickm dot org
Description: ------------ The _getToken function deals properly with escaped quotes inside of quoted strings when dealling with callback functions. It retrieves everything until it meets an unquoted quote matching the beginning quote or the end of line. The only problem is that when the string is displayed, it still prints the backslash. This is likely the intended behavior if the atrribute was given without quotes, since it allows you to write backslashes without having to worry about escaping them. But when you've quoted the attribute, escaping any quotes inside is necessary, but not desired when printed. Reproduce code: --------------- func_callback ('Nixon\'s cool.') This can be fixed by adding the stripslashes by replacing this line inside _buildFunctionlist(): $funcData['args'][] = ('"' == $arg2{0} || "'" == $arg2{0}) ? substr($arg2, 1, -1) : $arg2; with: $funcData['args'][] = ('"' == $arg2{0} || "'" == $arg2{0}) ? stripslashes(substr($arg2, 1, -1)) : $arg2; Expected result: ---------------- Nixon's cool. Actual result: -------------- Nixon\'s cool.

Comments

 [2004-07-11 22:14 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!
 [2004-08-10 15:54 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!
 [2004-10-20 11:04 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!