You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First replace invocation doesn't escape < or >, whereas second snippet escapes &. This behavior is inconsistent with Mojo::DOM, as can be shown by the following piece of code:
use Mojo::DOM;
my$dom = Mojo::DOM->new('<div><p>Alex</p></div>');
$dom->at('div')->replace('<b>1</b>');
say$dom->to_string; # prints <b>1</b>$dom = Mojo::DOM->new('<div><p>Alex</p></div>');
$dom->at('div')->replace(''hi');
say$dom->to_string; # prints 'hi which is equivalent to 'hi
The text was updated successfully, but these errors were encountered:
akarelas
changed the title
el.replace escapes & but not < or >, which is different than Mojo::DOM
el.replace escapes ' but not < or >, which is different than Mojo::DOM
Dec 18, 2023
First
replace
invocation doesn't escape < or >, whereas second snippet escapes &. This behavior is inconsistent with Mojo::DOM, as can be shown by the following piece of code:The text was updated successfully, but these errors were encountered: