Jenkins职位描述支持哪些html [英] Which html is supported in Jenkins job description

查看:217
本文介绍了Jenkins职位描述支持哪些html的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在工作描述中,您可以使用Html标签。
我有类似的东西:

  blabla .. on< a href =http:// vms029 / wa_shdw target =_ blank> http:// vms029 / wa_shdw< / a> 

但是 target =_ blank好像在某个地方擦洗。
有另一种方法吗?
Jenkins允许你使用各种标记语言来写作业描述;插件可以定义如何通过 MarkupFormatter 界面。



默认情况下, RawHtmlMarkupFormatter ,它应用HTML卫生政策(来自 OWASP AntiSamy项目)— Myspace政策 a>。



在Myspace策略中,您会看到只允许使用某些标签和属性。 target 不是其中之一,这就是为什么你会看到它从你的输入中删除。



使用案例,替代方案是安装和配置另一个标记格式化插件,或编写自己的。一些例子包括:


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:

这篇关于Jenkins职位描述支持哪些html的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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