Skip to content
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

Trim whitespace from content[html] #135

Closed
sknebel opened this issue Nov 4, 2017 · 0 comments
Closed

Trim whitespace from content[html] #135

sknebel opened this issue Nov 4, 2017 · 0 comments

Comments

@sknebel
Copy link
Member

sknebel commented Nov 4, 2017

The following

<div class="h-entry">
<div class="e-content">
  this should have whitespace trimmed


</div>
</div>

is parsed as

"content": [
                    {
                        "html": "\r\n  this should have whitespace trimmed\r\n\r\n\r\n",
                        "value": "this should have whitespace trimmed"
                    }

whereas according to the parsing specification whitespace at beginning and end of the HTML content should be trimmed as well:

html: the innerHTML of the element by using the HTML spec: Serializing HTML Fragments algorithm, with leading/trailing whitespace removed.

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

No branches or pull requests

1 participant