Friday, February 25, 2011

LinkedIn and &038 posting issues

LinkedIn has a strange error when using its Share API
Couldn't parse share document: error: Unexpected character encountered (lex state 3): 'h' 

I was able to replicate the issue by doing a wget on this file:
http://developer.linkedin.com/docs/DOC-1212

...and then noticing that the document got retrieved with this URL encoding for Clara's Facebook Era image:

This link breaks:
http://thecommunicationsstrategist.files.wordpress.com/2010/10/the-facebook-era-cover-2nd-edition.jpg?w=199&h=300

This link works::
http://thecommunicationsstrategist.files.wordpress.com/2010/10/the-facebook-era-cover-2nd-edition.jpg?w=199&h=300

It looks to me Wordpress is inserting back 038 characters and LinkedIn is barfing because of it:

http://www.simplestepsit.com/your-html-ampersand-doesnt-work-in-wordpress-now-what.html
http://codex.wordpress.org/How_WordPress_Processes_Post_Content

&
The post processing can take your “&” character and covert it to & which can be a problem if the page is used for video embedding codes and URL’s.
The page I was working on used these special parameters to set the column width and sent the information back to the video service, which then inserted the HTML back into my page. Since WordPress would change the code ‘on the fly’ (not inside my database), I didn’t see this issue at first.
Fortunately for me, while debugging another issue, the support person for the video service did notice and brought it to my attention and I tracked down the issue and the fix.

I guess Wordpress bloggers should know about this issue:

http://www.simplestepsit.com/your-html-ampersand-doesnt-work-in-wordpress-now-what.html

No comments:

Post a Comment