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

Security Class renaming script type="application/ld+json" #9

Open
ramenknight opened this issue Apr 1, 2020 · 1 comment
Open

Security Class renaming script type="application/ld+json" #9

ramenknight opened this issue Apr 1, 2020 · 1 comment

Comments

@ramenknight
Copy link

ramenknight commented Apr 1, 2020

Hi Marco,

Hope you are doing well in this current climate.

Seems that the security class is renaming the <script type="application/ld+json"> (used for Google markups) to <script type="text/javascript"> creating several issues.

Any idea how I can fix this issue without disabling the class?

Thanks,

@ramenknight
Copy link
Author

I was able to find that out that $buffer = preg_replace('/<script(?!.*(src\\=))[^>]*>/', '<script type="text/javascript">', $buffer); is the code that is renaming all <script>, but i sill don't know how to keep it, while ignoring the <script type="application/ld+json">

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

1 participant