Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added CSS comment filtering and refactored basic validation

  • Loading branch information...
commit 5db97730a1068041ce70f896c0567f5ba0df3953 1 parent f75e22a
@cbas cbas authored
Showing with 5 additions and 4 deletions.
  1. +5 −4 Client/src/main/XHTML-IM.js
View
9 Client/src/main/XHTML-IM.js
@@ -201,10 +201,11 @@ function FilterNode ( Message, HTMLElement, XMLTag )
*/
if ( AttributeName == 'style' )
{
- var Style = Attributes( i ).value;
- Style.replace( '\\', '' );
- Style.replace( '&', '&' );
- Style.replace( '&', '&' );
+ var Style = Attributes( i ).value
+ .replace( /\/\*.*?(?:(?:\*\/)|$)/g, '' )
+ .replace( '\\', '' )
+ .replace( '&', '&' )
+ .replace( '&', '&' );
if ( ! BlackProtocolsRegEx.test( Style ) && ! BlackStylesRegEx.test( Style ) )
NodeHTMLElement.style.cssText = Style;
}
Please sign in to comment.
Something went wrong with that request. Please try again.