Closed tapan-thapa closed 11 months ago
Is there a specific reason other than wanting to not see encoded characters in the output?
I believe the code responsible for this is is the MinifyHtml
transformer:
Note how the json_encode()
call lacks JSON_UNESCAPED_UNICODE
.
We are into the news business and every other publisher which i know is having "unescaped unicode" content in the view source. I am in the impression that if i don't send "unescaped unicode" content in the body, our SEO ranking may be impacted but i am not sure on this.
Thanks for pointing out to the right part of the code. After adding "JSON_UNESCAPED_UNICODE" in the json_encode, my issue is resolved.
Can we consider this as a permanent change in this library? Or you have any specific reason not to use "JSON_UNESCAPED_UNICODE" in the json_encode function?
I don't believe there is any reason why JSON_UNESCAPED_UNICODE
wasn't used.
@thelovekesh Would you please add that flag and check if it has any unintended side effects?
Just to update, I am running production with this flag since last 2 days and not faced any production issue.
@westonruter I have tested the AMP plugin with the JSON_UNESCAPED_UNICODE
flag and it's working as expected.
@tapan-thapa Curious about your tech stack. How are you using this package in your project?
@westonruter We have a "Codeigniter" based project in which i am using this library via composer. I am giving fully baked AMP HTML to this library and getting optimised AMP HTML in return.
Hello,
My raw HTML (AMP HTML) is having application/ld+json schema with "Hindi" characters which is getting converted as below in output.
Can we do something so that i get proper UTF-8 back as available in raw HTML?