Skip to content
This repository has been archived by the owner on Jan 29, 2020. It is now read-only.

Fix encoding of supplementary characters #3

Merged

Conversation

zerocrates
Copy link
Contributor

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.

Fixes incorrect encodings for codepoints U+10000 and above.
Fixes incorrect encoding for supplementary characters.
@zerocrates zerocrates changed the title Use UTF-32 internally in escapeHtmlAttr to fix encoding of supplementary characters Fix encoding of supplementary characters Jul 14, 2015
@mwillbanks
Copy link
Contributor

@padraic could you please review this change?

@samsonasik
Copy link
Contributor

ping @padraic

1 similar comment
@samsonasik
Copy link
Contributor

ping @padraic

@mwillbanks
Copy link
Contributor

ping @weierophinney @Ocramius - can you provide this a review

@marc-mabe
Copy link
Member

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 U+10000 listed here http://www.fileformat.info/info/unicode/char/10000/index.htm

@padraic
Copy link
Member

padraic commented Jan 7, 2016

Apologies for the delays all. Looks good here.

@samsonasik
Copy link
Contributor

merge, then?

@zerocrates
Copy link
Contributor Author

Any possibility of a merge before this celebrates its first birthday?

@weierophinney weierophinney added this to the 2.5.2 milestone Jun 30, 2016
@weierophinney weierophinney merged commit 3a30cef into zendframework:master Jun 30, 2016
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
weierophinney added a commit that referenced this pull request Jun 30, 2016
weierophinney added a commit that referenced this pull request Jun 30, 2016
@weierophinney
Copy link
Member

Thanks, @zerocrates - released with 2.5.2.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants