在我们的签名中包括HREF和IMG标签,并且不要让它们显示为HTML [英] Including HREF and IMG tags in our signatures and not having them show up as HTML

查看:105
本文介绍了在我们的签名中包括HREF和IMG标签,并且不要让它们显示为HTML的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在我的自动CodeProject签名中嵌入指向LinkedIn的链接,并且该链接在HREF标签中包含IMG标签. <>" IMG标签的括号总是最终被& lt;"代替和& gt;",因此链接看起来像html,而不是显示图像.知道如何解决此问题吗?

粘贴到签名框中时看起来不错,但是保存括号后,gety更改了,看起来不再合适.



< img src ="http://www.linkedin.com/img/webpromo/btn_profile_greytxt_80x15.png" width ="80" height ="15" border ="0" alt =查看David Catriel的个人资料LinkedIn">

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">

推荐答案

此问题可能可以解决,也可能无法解决.顺便说一句,LinkedIn很可能会过滤所有帖子,以禁止HTML标记作为一种安全措施,这很常见.您可以尝试在LinkedIn http://www.linkedin.com/answers [
(任何想了解我在说什么的人都可以看一下v.1的问题.)

祝你好运,
—SA
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


Thx SA,但我认为您走错了路,也许是因为我最初的问题还不够清楚.我现在已经对其进行了编辑,以使情况有所澄清.

我的问题是,LinkedIn的链接已嵌入我的CodeProject签名中.如果您在签名中添加一个链接,该链接由包含IMG标签的HREF标签组成,则CodeProject网站将删除<".和>"围绕IMG标签的字符,并将其替换为& lt;"和& gt;"文本.当您看到我的签名时,不会正确处理IMG标签,并且看到的文本就像出现在我问题底部的上方(而不是显示png图像)一样.该链接仍然有效,但是看起来很棒.

至于您在我最初提出的问题中的清理工作-我特意输入了& lt;"和& gt;"因为该网站也在我的问题中替换了这些内容(我现在意识到它们具有将我的内容处理为纯文本而不是html"选项,这可能是为什么它对您有用的原因);我需要读者确切地知道我在说什么字符.
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.


这篇关于在我们的签名中包括HREF和IMG标签,并且不要让它们显示为HTML的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆