Menu

#116 problem getting tag attributes

closed
None
2018-12-06
2012-11-03
radhouano
No

I have a problem when I try to get attributes which is not separated by spaces.
for example :
<img alt="toto"src="titi" width="blabla" />
src and width attributes are ignored.
I arrived to fix this problem by changing the line 1400 in the methode read_tag()

//if ($this->char!==null && $space[0]==='')

if ($this->char!==null && $space[0]==='' && ! count($node->attr))

Discussion

  • LogMANOriginal

    LogMANOriginal - 2018-12-06

    Thanks for reporting this issue!

    Technically, whitespace is required by the HTML specification, but most browsers will just accept if it's missing.

    [20af05] fixes this issue.

     

    Related

    Commit: [20af05]

  • LogMANOriginal

    LogMANOriginal - 2018-12-06
    • status: open --> closed
    • assigned_to: LogMANOriginal
     

Log in to post a comment.