googlearchive / caja

Caja is a tool for safely embedding third party HTML, CSS and JavaScript in your website.
Apache License 2.0
1.13k stars 113 forks source link

Compare strings with"==" or "!=" #2036

Open QiAnXinCodeSafe opened 5 years ago

QiAnXinCodeSafe commented 5 years ago

You should compare strings with equals https://github.com/google/caja/blob/43ee1c8f4f6d44032173d1c1da2d04b96f81ecf6/src/com/google/caja/parser/html/DomParser.java#L346 https://github.com/google/caja/blob/43ee1c8f4f6d44032173d1c1da2d04b96f81ecf6/src/com/google/caja/parser/html/DomParser.java#L414 https://github.com/google/caja/blob/43ee1c8f4f6d44032173d1c1da2d04b96f81ecf6/src/com/google/caja/render/JsMinimalPrinter.java#L110 https://github.com/google/caja/blob/43ee1c8f4f6d44032173d1c1da2d04b96f81ecf6/src/com/google/caja/parser/ParserContext.java#L123