Open Orhideous opened 2 years ago
Description Due to too eager HtmlEntityDecodeFilter behavior recipes, containing " somewhere cannot be added from URL, because it converts " to " and brokes resulting JSON.
HtmlEntityDecodeFilter
"
"
Reproduction Steps to reproduce the behavior:
Expected behavior Recipe should be added
Actual behavior Instead of recipe error appears
As workaround I propose to add ENT_NOQUOTES flag to HtmlEntityDecodeFilter, like this:
ENT_NOQUOTES
class HtmlEntityDecodeFilter extends AbstractHtmlFilter { public function apply(string &$html): void { $html = html_entity_decode($html, ENT_NOQUOTES); } }
More correct fix will require some refactoring: IMHO, this filter should be applied only to all text fields in recipe instead of applying to raw data.
Depends on #1110
See #1110
This PR/issue depends on:
Description Due to too eager
HtmlEntityDecodeFilter
behavior recipes, containing"
somewhere cannot be added from URL, because it converts"
to"
and brokes resulting JSON.Reproduction Steps to reproduce the behavior:
Expected behavior Recipe should be added
Actual behavior Instead of recipe error appears
As workaround I propose to add
ENT_NOQUOTES
flag toHtmlEntityDecodeFilter
, like this:More correct fix will require some refactoring: IMHO, this filter should be applied only to all text fields in recipe instead of applying to raw data.
Depends on #1110