Single quotes in link's title attribute
-
Hi Rob,
First of all thanks for the great plugin, it has been really useful to our little community website.
I use latest version (2.0.7) and stumbled upon an issue related to single quotes: in French language we use them a lot (for instance “the post” translates to “l’article”). I saw that in the archives, the title attribute on the links includes the title “as is” without apparently escaping it.
I made a little mod on my local instance, in collapsArchList.php, by adding a call to htmlentities just below line 380:
$link = get_permalink($archPost);
$title_text = htmlentities($title_text, ENT_QUOTES);
$monthText .= ” <li class=’collapsing archives item’><a href=’$link’ ” .
“title=’$title_text’>$text$commcount\n”;That’s kind of “quickfix” but it seems to do the job. Maybe the options to
htmlentities
should be changed, but I think the issue was really with any single quote in the title mis-closing the attribute.Cheers,
Beno?t
- The topic ‘Single quotes in link's title attribute’ is closed to new replies.