This repository has been archived by the owner on Jan 29, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 30
Fix encoding of supplementary characters #3
Merged
weierophinney
merged 4 commits into
zendframework:master
from
zerocrates:escapehtmlattr-supplementary
Jun 30, 2016
Merged
Fix encoding of supplementary characters #3
weierophinney
merged 4 commits into
zendframework:master
from
zerocrates:escapehtmlattr-supplementary
Jun 30, 2016
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Fixes incorrect encodings for codepoints U+10000 and above.
Fixes incorrect encoding for supplementary characters.
zerocrates
changed the title
Use UTF-32 internally in escapeHtmlAttr to fix encoding of supplementary characters
Fix encoding of supplementary characters
Jul 14, 2015
@padraic could you please review this change? |
ping @padraic |
1 similar comment
ping @padraic |
ping @weierophinney @Ocramius - can you provide this a review |
For me as far as I know this fix looks fine. All current tests passed as well as the new ones which matches the result for the given test code point |
Apologies for the delays all. Looks good here. |
merge, then? |
Any possibility of a merge before this celebrates its first birthday? |
weierophinney
added a commit
that referenced
this pull request
Jun 30, 2016
Fix encoding of supplementary characters
weierophinney
added a commit
that referenced
this pull request
Jun 30, 2016
Thanks, @zerocrates - released with 2.5.2. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Fixes #2.
This PR adds test for supplementary characters (using the first supplementary character, U+10000, as an example) for escapeHtmlAttr, escapeCss, and escapeJs. The tests all fail on the current master branch and pass with the included changes.