mirrored from git://develop.git.wordpress.org/
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HTML API: Add normalization functions. #7331
Closed
Closed
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
d372c97
HTML API: Add normalization functions.
dmsnell 07e89bb
Lower-case names when calling for qualified tag name.
dmsnell 754118e
Adjust some text encoding.
dmsnell 9c6e34c
Remove inner text from elements which cannot contain it.
dmsnell 7f5783e
Lower-case inside of the serialization function.
dmsnell 2aa89fa
Progressive tense for function summaries.
dmsnell 7029b25
Leave space before self-closing flag to avoid later problems.
dmsnell 00a5773
Expand support for bogus comments.
dmsnell 99799b7
Whitespace
dmsnell db24c11
Update docs examples.
dmsnell 7b8aa53
Raise WP error when failing.
dmsnell 18b5005
Change error level to warning.
dmsnell 47f7f08
WIP: Move actual token serialization into a single-unit method.
dmsnell 92558b9
Add basic unit test suite.
dmsnell 6167887
Merge branch 'trunk' into html-api/normalize-html
dmsnell 95756e5
Call the new `get_full_comment_text()`
dmsnell fca6481
Make the kwality 110% butter
dmsnell b37b312
Fix wrong test setup.
dmsnell dd4ff16
More tests and NULL byte transformation.
dmsnell 588020f
Fix text alignment issue in comment.
dmsnell 0abf367
Fix text alignment in docs.
dmsnell 37b7fe8
Expand docblock for serialize_token
dmsnell File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would this make sense to throw an exception?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've tried to avoid throwing exceptions in use code. Tell me more about the value of potentially crashing vs. returning
null
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, I guess to give more information about why it is returning
null
. Maybe_doing_it_wrong()
then would be better? It would be helpful to get feedback in code for what is documented:There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah okay I see now. another thought I had was resetting to the beginning, parsing, and returning to the previous location, which involves double-parsing if already mid-way through a document.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've called
wp_trigger_error()
in these cases.