Closed kartikprabhu closed 6 years ago
According to http://microformats.org/wiki/microformats2-parsing in the last step for p-* and e-* parsing the <img> should be parsed for alt and src to get textContent
p-*
e-*
<img>
alt
src
<html> <body class="h-entry"> <p class="p-name">text text <img alt="image alt"/> </p> </body> </html>
"items": [ { "type": [ "h-entry" ], "properties": { "name": [ "text text" ] } }
"items": [ { "type": [ "h-entry" ], "properties": { "name": [ "text text \r\nimage alt" ] } }
<html> <body class="h-entry"> <p class="p-name">text text <img src="image src"/> </p> </body> </html>
"items": [ { "type": [ "h-entry" ], "properties": { "photo": [ "image src" ], "name": [ "text text" ] } } ]
"items": [ { "type": [ "h-entry" ], "properties": { "name": [ "text text \r\n image src" ], "photo": [ "image src" ] } } ]
Note the space inserted before the <img> src from the spec, which phpmf2 does not produce.
<img> src
Also, \r\n is next line as outputed by phpmf2
\r\n
According to http://microformats.org/wiki/microformats2-parsing in the last step for
p-*
ande-*
parsing the<img>
should be parsed foralt
andsrc
to get textContentAlt Example
HTML
Current output
Expected output
Src Example
HTML
Current output
Expected output
Note the space inserted before the
<img> src
from the spec, which phpmf2 does not produce.Also,
\r\n
is next line as outputed by phpmf2