Jump to content

Apostrophes in contact form - page source


Claudia M

Recommended Posts

I thought this was fixed in CC or did I miss something?  When I look at my page source I find this:

NOTE: Store Name Claudia’s Bargains  - showing in page source as Claudia's Bargains

 

HOMEPAGE

<meta name="description" content="Antiques, Vintage and Collectibles - We search yard sales, estate sales, flea markets, auctions and attics to find items you didn&#39;t know you were looking for">

 

CONTACT PAGE

      <meta name="description" content="Claudia&#39;s Bargains Collectibles and More Shop. We search yard sales, estate sales, flea markets, auctions and attics to find items you didn&#39;t know you were looking for. Toss in some brand new items and some handcrafted creations and the mix is complete!">

 

Claudia

Link to comment
Share on other sites

What needs to to be is for the source to be unambiguous about quotes and apostrophes.

Note the value of the content is enclosed in quotes. Thus, any value for that having quotes itself would prematurely close the string. Such as:

content="We have the "very best" stuff!"

There are two ways to "somewhat" overcome this dilemma: use apostrophes when enclosed in quotes or use quotes when enclosed in apostrophes, and 'escaping' the quote or apostrophe (\"). Each method is used where appropriate.

A third way is to change the problem characters to its 'HTML Entity'. In almost all cases, the browser will show the entity as its associated character. I have found that the browser title might away with having a quote or apostrophe as this value is enclosed in <title> tags, not actual quotes. Still, CubeCart converts the admin entered string to use the entity (makes it easy to database the value as well) and the browser will show the associated character in the title. (That wasn't always the case - reference Internet Explorer 6.)

So, the question then becomes, will whatever that is out on the Internet that slurps your site's meta data know what to do with the entity? We must expect that it does.

I think what got fixed may have been putting the actual characters in the content value and thus causing truncated results with what got truncated to be visible.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...