microformats/php-mf2

Trim whitespace from content[html]

sknebel opened this issue · 0 comments

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.