artesaos / seotools

SEO Tools for Laravel
MIT License
3.04k stars 503 forks source link

Problem with "" in Title. #189

Closed haleyngonadi closed 2 years ago

haleyngonadi commented 4 years ago

What steps will reproduce the problem?

When I have a title that has quotes around it, the title cuts off in the meta title. SEOMeta::setTitle($post->title);

What is the expected result?

The title not cutting off after the after the quotes!

What do you get instead?

The title cuts off after the quotes!

Additional info

Q A
This Package Version 1.?.?
Laravel Framework Version 5.7.0
PHP version 7.1.2
Operating system Mac OS

The actual title: First Look: Show TV's "Ramo" How it shows up in the meta: https://imgur.com/jMTQWWG

jdwolfe commented 4 years ago

I noticed the same problem. I fixed this on my system by using the htmlentities() function in the getTitle() functions of these files: src/SEOTools/SEOMeta.php src/SEOTools/OpenGraph.php src/SEOTools/TwitterCards.php