Skip to content
New issue

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

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

Already on GitHub? # to your account

Purifier is removing tags other then "p" tag. #151

Open
ghost opened this issue Sep 8, 2021 · 1 comment
Open

Purifier is removing tags other then "p" tag. #151

ghost opened this issue Sep 8, 2021 · 1 comment

Comments

@ghost
Copy link

ghost commented Sep 8, 2021

I have two html editors.
There values are something like
$html1 = '

html1


<script>alert(1);</script>';
$html2 = '

html2


<script>alert(2);</script>';

But when I purify them it result into only P tag.

echo(Purifier::clean($html1));
Output-> '

html1

'
Required output->'

html1


'

echo(Purifier::clean($html2));
Output-> '

html2


'
Required output->'

html2


'

@jobindas82
Copy link

look for 'AutoFormat.AutoParagraph' => false, in app/purifier.php

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

No branches or pull requests

1 participant