[6.0] Fix emailToPunycode() throws "Prohibited input U+0000005C" #46450
+5
−2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull Request for Issue #46356.
Summary of Changes
In Joomla 6 the algo26-matthias/idna-convert package got updated to version 4.2.1.
That library now throws an error when it encounters the ending
com\.With the change of this PR the thrown error is ignored and the email is kept.
This is the inital PR that introduced the emailToPunycode function:
#9041
Update
It seems to me, like the whole function was introduced because of the email cloaking plugin.
https://issues.joomla.org/tracker/joomla-cms/8881
That seems to be handling UTF-8 characters just fine now. Can we maybe remove that behavior from the ComponentHelper::filterText() function all together?
Testing Instructions
In Joomla 6 try to save an article with the following content
"mailto:[email protected]\"Actual result BEFORE applying this Pull Request
Exception is thrown "Prohibited input U+0000005C"
Expected result AFTER applying this Pull Request
Article is saved.
Link to documentations
Please select:
Documentation link for docs.joomla.org:
No documentation changes for docs.joomla.org needed
Pull Request link for manual.joomla.org:
No documentation changes for manual.joomla.org needed