问题描述
在工作描述中,您可以使用Html标签。我有类似的东西:
blabla .. on< a href =http:// vms029 / wa_shdw target =_ blank> http:// vms029 / wa_shdw< / a>
但是 target =_ blank
好像在某个地方擦洗。
有另一种方法吗?
Jenkins允许你使用各种标记语言来写作业描述;插件可以定义如何通过界面。
默认情况下,,它应用HTML卫生政策(来自)— :转义所有HTML标记(可能对您不太有用) :允许任何 HTML输入(与关联安全风险)
target =_ blank
)In the Job description you can use Html tags.I have something like:
blabla.. on <a href="http://vms029/wa_shdw" target="_blank">http://vms029/wa_shdw</a>
But the target="_blank"
seems to get scrubbed somewhere.Is there another way?Any doc on whats supported and what's not?
Jenkins allows you to use various markup languages to write job descriptions; plugins can define how the description should be parsed via the MarkupFormatter
interface.
By default, the RawHtmlMarkupFormatter
is used, which applies an HTML sanitisation policy (from the OWASP AntiSamy Project) — the Myspace policy.
In the Myspace policy, you'll see that only certain tags and attributes are allowed. target
isn't one of them, which is why you see it being stripped from your input.
For your use case, the alternatives are to install and configure another markup formatter plugin, or to write your own. Some examples include:
- Escaped Markup Plugin: escapes all HTML tags (probably not so useful for you)
- "Anything Goes" Formatter: allows any HTML input at all (with the associated security risks)
- PegDown Formatter Plugin: lets you write your descriptions in Markdown (probably the nicest option here, but likely doesn't support things like
target="_blank"
)
这篇关于Jenkins职位描述支持哪些html的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!