I have an apostrophe in one of my blog titles in WordPress. The word is - doesn’t - however it shows up on the website/preview as - doesn& # 0 3 8 ; & # 8 2 1 7 ;t - (spaces had to be put in between so that it would show here)
- All plug ins and wordpress are updated
- Custom theme. Using Sage
- Tried deactivating plug in, didn’t help
Haven’t been able to find a solution for this
If you’re using Sage (it’s unclear from your post if you’re using any part of the Roots stack) then the issue may be that you’re using a {{ }}
tag. Blade runs anything sent to that tag through the htmlspecialchar
function, which will do stuff like what you’ve described. From the Blade Documentation:
By default, Blade {{ }}
statements are automatically sent through PHP’s htmlspecialchars
function to prevent XSS attacks. If you do not want your data to be escaped, you may use the following syntax:
Hello, {!! $name !!}.
2 Likes
That did it, thank you @alwaysblank!