kirby-deprecated-plugins / kirby-seo

51 stars 10 forks source link

Escape apostrophes in SEO controller JSON, fix #46 #47

Closed LeBenLeBen closed 7 years ago

LeBenLeBen commented 7 years ago

See #46

luxlogica commented 7 years ago

In order to cater to a wider range of use-cases, the PHP Manual entry for json_encode() suggests the following:

json_encode($a, JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_QUOT | JSON_HEX_AMP | JSON_UNESCAPED_UNICODE)

This should encode apostrophes, quotes, ampersands, tags and leave unicode characters alone.

jenstornell commented 7 years ago

Can someone try it out. If it works I will merge it.