@@ -1117,11 +1117,10 @@ define([
11171117 var glyphBox
11181118 heightTest = document . createElement ( 'div' )
11191119 //cover all the bases: stranded or not, phase or not
1120- heightTest . className = `feature ${ this . config . style . className } plus-${
1121- this . config . style . className
1122- } plus-${ this . config . style . className } 1`
1120+ var safeClassName = Util . sanitizeClassName ( this . config . style . className )
1121+ heightTest . className = `feature ${ safeClassName } plus-${ safeClassName } plus-${ safeClassName } 1`
11231122 if ( this . config . style . featureCss ) {
1124- heightTest . style . cssText = this . config . style . featureCss
1123+ heightTest . style . cssText = Util . sanitizeCss ( this . config . style . featureCss )
11251124 }
11261125 heightTest . style . visibility = 'hidden'
11271126 if ( Util . is_ie6 ) {
@@ -1338,7 +1337,9 @@ define([
13381337 dojo . addClass ( featDiv , 'feature' )
13391338 var className = this . config . style . className
13401339 if ( className == '{type}' ) {
1341- className = feature . get ( 'type' )
1340+ className = Util . sanitizeClassName ( feature . get ( 'type' ) )
1341+ } else {
1342+ className = Util . sanitizeClassName ( className )
13421343 }
13431344 var strand = feature . get ( 'strand' )
13441345 switch ( strand ) {
@@ -1386,7 +1387,7 @@ define([
13861387 `left:${ ( 100 * ( displayStart - block . startBase ) ) / blockWidth } %;` +
13871388 `top:${ top } px;` +
13881389 ` width:${ featwidth } %;${
1389- this . config . style . featureCss ? this . config . style . featureCss : ''
1390+ this . config . style . featureCss ? Util . sanitizeCss ( this . config . style . featureCss ) : ''
13901391 } `
13911392
13921393 // Store the containerStart/End so we can resolve the truncation
@@ -1398,16 +1399,17 @@ define([
13981399 var ah = document . createElement ( 'div' )
13991400 var featwidth_px = ( featwidth / 100 ) * blockWidth * scale
14001401
1402+ var safeArrowClass = Util . sanitizeClassName ( this . config . style . arrowheadClass )
14011403 switch ( strand ) {
14021404 case 1 :
14031405 case '+' :
1404- ah . className = `plus-${ this . config . style . arrowheadClass } `
1406+ ah . className = `plus-${ safeArrowClass } `
14051407 ah . style . cssText = `right: ${ - this . plusArrowWidth } px`
14061408 featDiv . appendChild ( ah )
14071409 break
14081410 case - 1 :
14091411 case '-' :
1410- ah . className = `minus-${ this . config . style . arrowheadClass } `
1412+ ah . className = `minus-${ safeArrowClass } `
14111413 ah . style . cssText = `left: ${ - this . minusArrowWidth } px`
14121414 featDiv . appendChild ( ah )
14131415 break
0 commit comments