Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix backward compatibilty function limonade_htmlspecialchars_decode. …

…Now supports ' entities
  • Loading branch information...
commit 505a05854bc458c46454837af76e3fbf4a20e22e 1 parent e4c8ee2
Fabrice Luraine authored
Showing with 2 additions and 1 deletion.
  1. +1 −1  lib/limonade.php
  2. +1 −0  tests/main.php
View
2  lib/limonade.php
@@ -2595,7 +2595,7 @@ function limonade_htmlspecialchars_decode($string, $quote_style = ENT_COMPAT)
{
$table = array_flip(get_html_translation_table(HTML_SPECIALCHARS, $quote_style));
if($quote_style === ENT_QUOTES)
- $table['''] = '\'';
+ $table['''] = $table['''] = '\'';
return strtr($string, $table);
}
View
1  tests/main.php
@@ -220,6 +220,7 @@ function test_main_htmlspecialchars_decode()
assert_equal(limonade_htmlspecialchars_decode('&lt;'), '<');
assert_equal(limonade_htmlspecialchars_decode('&gt;'), '>');
assert_equal(limonade_htmlspecialchars_decode('&amp;'), '&');
+ echo htmlspecialchars_decode('&#39;', ENT_QUOTES);
assert_equal(limonade_htmlspecialchars_decode('&#39;', ENT_QUOTES), '\'');
assert_equal(limonade_htmlspecialchars_decode('&#039;', ENT_QUOTES), '\'');
}
Please sign in to comment.
Something went wrong with that request. Please try again.