jenkins job description safe html font color设置后无效

jenkins job description safe html font color设置后无效

查下了原因是以为 最新版本的插件 antisamy-markup-formatter.jpi 为了安全更新导致的:
将 Jenkins 升级到最新的 LTS 版本 2.263.1 后,将 HTML 放入工作描述或构建描述以某种方式在服务器端进行处理并删除一些内容,例如:
After upgrading Jenkins to the latest LTS version 2.263.1 the HTML put in job description, or build description is somehow processed server side and stuff is removed, like:

"font" tags are removed completely
IMPACT:   lost all formatting (color, font size, font effects)
workarround is to set the font as a style  
source:           <li><font size="2" color="purple"> MESSAGE </font></li>
rendered:        <li> MESSAGE </li>
solution:          <li style="color:purple!important; font-size:20px"> MESSAGE </li>
"title" attributes are removed from all tags
IMPACT:   no more tooltips on our tables
No workaround
source:         <td title="TOOLTIP"> MESSAGE </td>
rendered:      <td> MESSAGE </td>
"rowspan" / "colspan" attributes are removed from "td" and "th" tags
IMPACT:   pre-existent tables are now misaligned 
No workaround
source:        <th rowspan="2" colspan="3">Build</th>
rendered:     <th>Build</th>

jenkins issue 地址

解决办法删除下最新的插件,下载之前的版本如1.8重启即可:

https://updates.jenkins.io/download/plugins/antisamy-markup-formatter/1.8/antisamy-markup-formatter.hpi

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值