Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

At v1.0.14 stripIgnoreTag behavior changed #265

Open
BlakeStearman opened this issue Nov 15, 2022 · 1 comment
Open

At v1.0.14 stripIgnoreTag behavior changed #265

BlakeStearman opened this issue Nov 15, 2022 · 1 comment

Comments

@BlakeStearman
Copy link

BlakeStearman commented Nov 15, 2022

Overview

With the update to v1.0.14 I noticed that with the stripIgnoreTag: true option set, strings containing < but no actual HTML began to be stripped at the point of the < character. Example, "x < 12" at v1.0.13 would be sanitized to "x &lt; 12", but at v1.0.14 that same string would be sanitized to "x ".

Is this new behavior in v1.0.14 fixing prior incorrect behavior of stripIgnoreTag, or is it an unintended regression? Based on past behavior, it looks like a regression, but I would like to understand this as it does cause quite a big change when processing strings that do not contain actual HTML tags.

This behavior change seems to be caused by this commit: 72844dd

Demo

I have created a CodePen where you can switch between v1.0.13 and v1.0.14 and see the change in behavior visually.

@dasa
Copy link

dasa commented May 3, 2024

Ping 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants