Hi there,

The company I'm implementing Meta Tags for has an apostrophe in the company name (e.g., "Lefty's Used Cars"). The data is going into the nodewords table with the straight quotes unencoded, but when the meta tags are spit out in the header, they print like so:

<meta name="description" content="Lefty&#38;#039;s Used Cars offers lots of really special automobiles to our customers." />
<meta name="keywords" content="used cars,other terms,lefty&#38;#039;s,leftys" />

According to SEO experts I've spoken with, this is a problem. I'm not sure whether this is something that can be addressed on the module level, but if not, I'm hoping someone can help point me to a solution.

My aplologies if this has been addressed elsewhere -- I couldn't find any mention of it.

Thanks so much!

CommentFileSizeAuthor
#2 nodewords-check_content.txt839 bytesRobrecht Jacques

Comments

Robrecht Jacques’s picture

Status: Active » Needs review

The ' is replaced by &amp;#039; in _nodewords_check_content() which is called on the text of each meta tag. In that function the call to check_plain() does the replacing.

Please replace the old function _nodewords_check_content($text) with the one in the attachment (adding 3 lines) and report whether this works for you. I'll commit it if you tell me it works like intended.

(sorry, don't have the ability to create a real patch now - setting it as "patch (code needs review)" anyway)

Robrecht Jacques’s picture

StatusFileSize
new839 bytes

Attachment.

kwhite’s picture

Works like a charm! The ' now displays correctly. Thanks so much!

Robrecht Jacques’s picture

Status: Needs review » Fixed
Robrecht Jacques’s picture

Version: 4.7.x-1.0 » 5.x-1.0
Status: Fixed » Patch (to be ported)
BioALIEN’s picture

Waiting for status of the port to 5.x in order to close it.

Robrecht Jacques’s picture

Version: 5.x-1.0 » 5.x-1.2
Status: Patch (to be ported) » Fixed

Fixed in version 5.x-1.2 that will be released shortly.

Anonymous’s picture

Status: Fixed » Closed (fixed)