0
点赞
收藏
分享

微信扫一扫

jenkins Build History描述信息的字符串有特殊字符\u200b

jenkins版本:2.249

问题点:Jnekins Build History描述信息字符串

其他版本可能也会有这个问题,没有看在哪个版本解决的,不知道是jenkins的问题,还是java问题


在做pipeline或者其他需要用到描述信息里面的字符串时,往往直接选择、拷贝。

但是粘贴到其他地方,这个字符串不可用,导致应用报错

有问题字符串:红点为  \u200b
xx.xx.xx.xx.202211091​624

正常字符串:
xx.xx.xx.xx.202211091624

其他人也遇到过:

​​https://stackoverflow.com/questions/63229313/how-can-i-delete-zero-width-space-in-a-jenkin-pipeline​​

​​https://stackoverflow.com/questions/35657620/illegal-character-error-u200b​​


解决方法:

1、不从Build History处复制,点击build,进入build页面,这里面的描述信息字符串是没问题的。

2、替换字符串:replace("\u200b", "")

举报

相关推荐

0 条评论