mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-08 01:26:03 +00:00
[FIXED JENKINS-20928] l:breakable mishandles HTML metacharacters
This commit is contained in:
1 parent
23e9e7c0a6
commit
3f1f122ff4
2 files changed
+22
-5
No files matched your search
@@ -1824,8 +1824,8 @@ public class Functions {
|
||||
*/
|
||||
public static String breakableString(final String plain) {
|
||||
|
||||
return plain.replaceAll("(\\p{Punct}+\\w)", "<wbr>$1")
|
||||
.replaceAll("(\\w{10})(?=\\w{3})", "$1<wbr>")
|
||||
return plain.replaceAll("([\\p{Punct}&&[^;]]+\\w)", "<wbr>$1")
|
||||
.replaceAll("([^\\p{Punct}\\s-]{10})(?=[^\\p{Punct}\\s-]{3})", "$1<wbr>")
|
||||
;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user