Click here to Skip to main content
15,886,788 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I'm trying to embed a link to LinkedIn in my automatic CodeProject signature, and it contains an IMG tag within a HREF tag. The "<>" brackets of the IMG tag always end up being replaced by "&lt;" and "&gt;", and so the link looks like html instead ofshowing an image. Any idea how to fix this?

It looks fine when pasted into the signature box, but after saving the brackets gety changed and it no longer looks ok.



<img src="http://www.linkedin.com/img/webpromo/btn_profile_greytxt_80x15.png" width="80" height="15" border="0" alt="View David Catriel's profile on LinkedIn">

Posted
Updated 20-Dec-11 5:46am
v3

This problem may or may not be solvable. It's quite possible that LinkedIn filter all posts to disallow HTML markup as a security measure, very usual, by the way. You can try to ask this question at LinkedIn, http://www.linkedin.com/answers[^].

For a fist step, make sure you have better understanding of HTML. Pay attention that I edited your question to show HTML entities and their source code for <> correctly, as &lt; and &gt;. As you have failed to show these entities in CodeProject HTML post correctly, I cannot 100% trust that you tried to do it at the LinkedIn site correctly. To get a good idea, simply click "Improve question" above and see my changes to your HTML markup; read correspondent documentation on XML and HTML "character entities". Well, just in case.

(Anyone who wants to understand what am I talking about can look at the v.1 if the question.)

Good luck,
—SA
 
Share this answer
 
Comments
Wendelius 20-Dec-11 15:53pm    
From OP's solution:

Thx SA, but I think you went down the wrong path, maybe because my original question was not clear enough. I've now edited it to clarify things a bit.

My issues is with links to LinkedIn being embedded in my CodeProject signature. If you add a link to your signature that is composed of a HREF tag containing an IMG tag, the CodeProject site will strip the "<" and ">" characters sourrounding the IMG tag and replace them with "<" and ">" text. When you then see my signature, the IMG tag is not processed proceperly and you see the text just like it appears at the bottom of my question up above (instead of showing the png image). The link still works, but it looks aweful.

As for your cleanup in my original question - I had purposely typed in "<" and ">" because the site was replacing those as well in my question (I now realize they have a "treat my content as plain text not as html" option, which is probably why it worked for you); I need the reader to know exactly what charcters I was talking about.
Thx SA, but I think you went down the wrong path, maybe because my original question was not clear enough. I've now edited it to clarify things a bit.

My issues is with links to LinkedIn being embedded in my CodeProject signature. If you add a link to your signature that is composed of a HREF tag containing an IMG tag, the CodeProject site will strip the "<" and ">" characters sourrounding the IMG tag and replace them with "&lt;" and "&gt;" text. When you then see my signature, the IMG tag is not processed proceperly and you see the text just like it appears at the bottom of my question up above (instead of showing the png image). The link still works, but it looks aweful.

As for your cleanup in my original question - I had purposely typed in "&lt;" and "&gt;" because the site was replacing those as well in my question (I now realize they have a "treat my content as plain text not as html" option, which is probably why it worked for you); I need the reader to know exactly what charcters I was talking about.
 
Share this answer
 
Comments
Wendelius 20-Dec-11 15:52pm    
Instead of posting a new solution, use the Have a Question or Comment? button to send a message to the author of a solution.
David Catriel 20-Dec-11 16:18pm    
Thx. Will do.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900