0

Basicly i got the simple text to be put in a as title of BLOG post ->

This is some random title with "quotation" marks 

the result i get is this

This is some random title with

HTML Purifier cuts everything after 1st quotation mark, i am looking for a way to have quotation marks and no too cut off the string after them.

Thanks

zinho
  • 225
  • 1
  • 2
  • 9
  • Why are you running HTML Purifier on non-HTML content? Just HTML escape the title. This is for a `` right? – Wesley Murch Jun 04 '14 at 09:03
  • actualy , this title is shown in an input field that has this title as set as value so the problem is in the double quotation marks that appear in HTML code... value = "some "value" not showing " – zinho Jun 04 '14 at 09:05

1 Answers1

1
$clean = htmlspecialchars(
 'This is some random title with "quotation" marks',
  ENT_QUOTES, 
 "UTF-8"
);
Ryan
  • 14,392
  • 8
  • 62
  • 102