joomla-cms
joomla-cms copied to clipboard
InputFilter fails on cleaning string with HEX entities as string
Summary of Changes
InputFilter::clean($string, 'string') fails when decoding the entities with HEX numbers
Testing Instructions
Execute the code:
$filter = \Joomla\CMS\Filter\InputFilter::getInstance();
var_dump($filter->clean('ÿ', 'string'));
die;
Actual result BEFORE applying this Pull Request
See error chr(): Argument #1 ($codepoint) must be of type int, string given
Expected result AFTER applying this Pull Request
No errors.
Link to documentations
Please select:
-
[ ] Documentation link for docs.joomla.org:
-
[x] No documentation changes for docs.joomla.org needed
-
[ ] Pull Request link for manual.joomla.org:
-
[x] No documentation changes for manual.joomla.org needed
I have tested this item :white_check_mark: successfully on fee33cb85ecb880ccc873e5fc2ecbfa833a6570f
Hi AlterBrains, I have tested this successfully.
It yields the answer of: string(2) "ÿ" so if that is expected - perfect.
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/43377.
I've restored @exlemor 's test result in the issue tracker so it's properly counted again. The commits which have invalidated the count were just clean branch updates.
It yields the answer of: string(2) "ÿ" so if that is expected - perfect.
@exlemor Yes, that character fits to the Unicode character given as hexadecimal number. See e.g. https://www.w3schools.com/charsets/tryit.asp?deci=255&ent=yuml .
I have tested this item :white_check_mark: successfully on 3d3e148d71f455eb534b2f0e51cafcd9197677b3
Works as described. In addition, I've tested that decimal values like 'ÿ' and entity names like 'ÿ' continue to work as before.
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/43377.
RTC
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/43377.
Thank you!