If this is your first visit, check our documentation. To post, register or login.
Forums / Zen Cart Code Suggestions / white space at end of meta descriptions

white space at end of meta descriptions

Started by torvista on 2 May 2016, 7:13 AM · Views: 51

Results 1 to 2 of 2
2 May 2016, 7:13 AM
#1
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,880
Plugin Contributions:
7

white space at end of meta descriptions

In meta_tags.php all the meta tag descriptions have a space added to the end:

define('META_TAG_DESCRIPTION', str_replace('"','',zen_clean_html($metatags_description . ' ')));

It wasn't valid in HTML4 but is apparently acceptable in HTML5.

Is there a reason for this space?

Steve
github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...

2 May 2016, 5:15 PM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Re: white space at end of meta descriptions

torvista:

Is there a reason for this space?
Of course there is, or it wouldn't have been put there. :D
But I have no idea right now what it was, nor who put it there.

But, by the same token, I'm not understanding why a space is considered an invalid character in a metatag which accepts a string of words separated by spaces as its primary content. I guess HTML5 is indeed doing things smarter.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.