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

strip_tags has some differences with php's version #455

Open
losnappas opened this issue Jan 27, 2022 · 1 comment
Open

strip_tags has some differences with php's version #455

losnappas opened this issue Jan 27, 2022 · 1 comment

Comments

@losnappas
Copy link

echo strip_tags("1<<<    a");
// => "1"
console.log(strip_tags("1<<<    a"))
// => "1<<<    a"

after = (after.substring(after.length - 1) === '<') ? after.substring(0, after.length - 1) : after

that line esp has some problems: strip_tags("1<<") // => "1<"

It looks like php version counts < characters and then deletes everything until it finds a matching closing one.

@kvz
Copy link
Collaborator

kvz commented Apr 4, 2024

Thanks for reporting. The core maintainers are low on time, would you like to PR a fix?

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