paquettg/php-html-parser

Symbol "{" inside meta tag content attribute partially breaks the parser

yalexwander opened this issue · 1 comments

When HTML document contains a fragment like:

<meta property="og:description" content="Route::register( [ '/' =&gt; 'Home', '/user/$id/profile' =&gt; function ($id) {echo &quot;Вы указали &quot; . (int) $id . &quot; в адре...">

It makes parsing the document incorrect - some nodes disappears. See test files and test runner in my repo:
https://github.com/yalexwander/php-html-parser-bug-example

I'm not even sure if it is a bug or expected behavior.

fsa commented

Confirm.

<h4><a href="URL" title="Просмотр профиля }I{eKa">}I{eKa</a></h4>

Part of the text is missing and the logic on the { sign is broken.