My inner Standard Police is coming out again. This time, errors on post-edit.g is able to be fixed.
1 The error
Line 711, Column 71: & did not start a character reference. (& probably should have been escaped as &.) post-edit.g?blogID=8246144319788321828<strong title="Position where error was detected.">&</strong>postID=5718095663952463684' title='Edit
Your Blogger template may have the following codes,
<b:includable id='postQuickEdit' var='post'> <b:if cond='data:post.editUrl'> <span expr:class='"item-control " + data:post.adminClass'> <a expr:href='data:post.editUrl' expr:title='data:top.editPostMsg'> <img alt='' class='icon-action' height='18' src='http://img2.blogblog.com/img/icon18_edit_allbkg.gif' width='18'/> </a> </span> </b:if> </b:includable>
The error is made by the fourth line of code,
<a expr:href='data:post.editUrl' expr:title='data:top.editPostMsg'> <img alt='' class='icon-action' height='18' src='http://img2.blogblog.com/img/icon18_edit_allbkg.gif' width='18'/> </a>
2 The fix
The URL in it to be precise. Escaping will resolve it. A quick fix is
<b:if cond='data:blog.pageType == "static_page"'> <a expr:href='"http://www.blogger.com/page-edit.g?blogID=[YOU_BLOG_ID]&amp;pageID=" + data:post.id' expr:title='data:top.editPostMsg'> <img alt='' class='icon-action' height='18' src='http://img2.blogblog.com/img/icon18_edit_allbkg.gif' width='18'/> </a> <b:else/> <a expr:href='"http://www.blogger.com/post-edit.g?blogID=[YOU_BLOG_ID]&amp;postID=" + data:post.id' expr:title='data:top.editPostMsg'> <img alt='' class='icon-action' height='18' src='http://img2.blogblog.com/img/icon18_edit_allbkg.gif' width='18'/> </a> </b:if>
Slight inconvenience, [YOU_BLOG_ID] needs to be replaced with the blogs ID. Also, the post and page use different link.
3 The email link
This fix is also can be used for email function with small modification,
<b:if cond='data:blog.pageType == "static_page"'> <a expr:href='"http://www.blogger.com/email-post.g?blogID=[YOU_BLOG_ID]&amp;pageID=" + data:post.id' expr:title='data:top.emailPostMsg'> <img alt='' class='icon-action' height='13' src='http://img1.blogblog.com/img/icon18_email.gif' width='18'/> </a> <b:else/> <a expr:href='"http://www.blogger.com/email-post.g?blogID=[YOU_BLOG_ID]&amp;postID=" + data:post.id' expr:title='data:top.emailPostMsg'> <img alt='' class='icon-action' height='13' src='http://img1.blogblog.com/img/icon18_email.gif' width='18'/> </a> </b:if>
This one, post and page uses same link but different parameter name.
4 Stuff still not able to be fixed
Those widgets, CSS link, links for page navigation, and navigation bar. They could be fixed easy by Blogger, just simple escaping or using CSS style as suggested by W3C validator. They give you a HTML5 template, but also a problematic one if you care about standard. If you dont care, why on Earth do you read to the end?
0 comments:
Post a Comment