php-simple-html-dom-parser icon indicating copy to clipboard operation
php-simple-html-dom-parser copied to clipboard

remove_noise breaking fields

Open pablodegrande opened this issue 8 years ago • 0 comments

PROBLEM When parsing a document having: <input name="me" value="my { dog is nice"> the document is parsed in an invalid way. The value property for $input in

   foreach($this->html->find('input[name='me']') as $input)

is "my {dog is nice" plus all remaining HTML, instead of "my {dog is nice".

WORKAROUND I commented $this->remove_noise("'({\w)(.*?)(})'s", true); in the load method, but I guess an improvement in remove_noise in order to be aware of quotes would be a better solution.

Regards, Pablo.

pablodegrande avatar Mar 30 '16 04:03 pablodegrande