By Timothy Garner on Friday, 17 January 2014
Posted in Technical Issues
Replies 9
Likes 0
Views 1.8K
Votes 0
When reviewing our blogs meta data it looks like EasyBlog (It may not be EasyBlog but it is only happening on blog pages. ) is replacing spaces and other ASCII Characters with the HTML character entities.

The OG and Twitter Card Descriptions are not doing this as well as the main blog (latest blogs) page. This may be because we are adding descriptions in the "Meta Descriptions" fields and the OG and Twitter descriptions are being populated via these fields.

It looks like the Meta Description tag is being populated via the content in the blog body (in the editor) and spaces and ASCII characters are being replaced.

See Screen shots for examples.
Example URLs are in the "Other Information" field attached.

Thank You,
Timothy
Hello Timothy,

Hm, yeah you are right there is a bug there where the blog post always uses the meta description from the blog's content rather than the one specified in the meta description. To fix this, edit the file /components/com_easyblog/helpers/helper.php and at line 3079 remove the codes below:


$result = new stdClass();
·
Saturday, 25 January 2014 13:21
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Tim,

It's actually necessary for us to escape the characters that are added into the meta data because your users might abuse this by performing xss attacks via the blog post. By the way, search engines would automatically treat & as an ampersand & So you don't really have to worry about it.
·
Friday, 17 January 2014 02:14
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Mark,

I understand the escaping characters to prevent xss attacks. the issue we were seeing is when adding a link to a third party website (like Facebook) it would pull the meta description instead of the "og:description" tag.

We were wondering why the meta description and the og:description do not match. It looks like the meta description is being populated by the content of the blog and the "og:description" is being populated by the "Meta Description" user field in the "Metadata" section in the EasyBlog entry.

The description added in the "Meta Description" user field in the "Metadata" section in the EasyBlog entry does not contain "" "&" or any other HTML character entities so it looks like it should in the "og:description". However, the meta description does contain these characters.

Thank You for you time,
Timothy
·
Tuesday, 21 January 2014 06:47
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Timothy,

If the blog post has a meta description, it will use the meta description, otherwise it will use the blog post's text as the og:description . If there is an og:description, I believe Facebook will use that rather than relying on the meta tags. Am I misunderstanding something here?
·
Tuesday, 21 January 2014 11:15
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Mark,

It looks like the only tag that uses the "meta description" user field is "og:description". Both the "twitter:description" and 'meta name="description"' use the blog posts text.

As far as Facebook:
For some reason Facebook uses meta description tag first and then after it caches the page it will start using the "og:description" tag. That is a Facebook problem and are at their mercy on that.

Thank you for your time,
Timothy
·
Saturday, 25 January 2014 03:31
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Mark,

Excellent. That fixed the Meta Description but the "twitter:description" tag is still using the blog content and not the "Met Description" user field.

And will I need to Document this change? Will an update overwrite this or will Stackideas make this change?

Thank You so much for you time!!!
Timothy
·
Tuesday, 28 January 2014 04:02
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello,

Can you try to upload this file into /components/com_easyblog/helpers/ and overwrite the twitter.php file?
·
Tuesday, 28 January 2014 11:33
·
0 Likes
·
0 Votes
·
0 Comments
·
You are the man Mark. That did it.

Are these changes going to be in the next update or do I need to document these changes and make them after updating?

Thank You for your time,
Timothy
·
Thursday, 30 January 2014 01:10
·
0 Likes
·
0 Votes
·
0 Comments
·
Yep, they are added internally as well
·
Thursday, 30 January 2014 02:10
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post