-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Inconsistent behavior of Phalcon\Tag::setAutoescape() #1263
Comments
Currently getValue()'s logic is as follows: function getValue($name, array $params)
{
if (isset(self::$_displayValues[$name])) {
$value = self::$_displayValues[$name]
}
else if (isset($_POST[$name])) {
$value = $_POST[$name];
}
else {
return null;
}
//...
} I suggest that we check the value in the following order:
In this scenario we will always honor autoEscape mode. |
Yes, when $params[$name] is set getValue is never called so the order is the same. This is ok, are you going to remove the escaping in getValue()? |
Changes:
|
ghost
closed this as completed
Sep 24, 2013
This issue was closed.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
None yet
0 participants
produces
value is escaped due to the bug introduced in a462ba2
However, the real issue is that Phalcon\Tag::getValue() only escapes the value when it is set either by setDefault() or is present in $_POST; if the value was specified in $params array it is NOT escaped by getValue() regardless of _autoEscape.
In the second case I would expect to see
The text was updated successfully, but these errors were encountered: