Details
-
Bug
-
Resolution: Fixed
-
Major
-
11.10.3
-
High
-
Easy
-
N/A
-
N/A
-
Description
When the color used in diff.css which is coming from the color theme is written with 3 chars instead of 6 (#fff instead pf #ffffff) then the diff.css velocity fails and the whole diff display is broken (including hidden unchanged items in the rendering view).
The code is there
https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwiki-platform-web/src/main/webapp/resources/uicomponents/viewers/diff.css
The problematic code is:
#set ($red = $integer.parseInt($hexColor.substring(1,3), 16))
#set ($green = $integer.parseInt($hexColor.substring(3,5), 16))
#set ($blue = $integer.parseInt($hexColor.substring(5), 16))
Since #fff is allowed this should be handled and we should even fallback to standard behavior if the color we get is completely wrong.