rudder icon indicating copy to clipboard operation
rudder copied to clipboard

Fixes #25050:

Open clarktsiory opened this issue 1 year ago • 2 comments

https://issues.rudder.io/issues/25050

Escape a bunch of JS strings.

We need to escape strings and will use the well tested common-text StringEscapeUtils for it.

  • add dependency to commons-text
  • remove use of scala.xml.Utility.escape since it is not really maintained anymore and is redondant with new dependency
  • use escapeHtml4 or escapeEcmaScript based on use case
  • check that ALL JsRaw are OK, and escaped strings that weren't.

There is a non negligible chance that it breaks something somewhere, but a first batch of tests (going to node, directive, rules, group, parameter, clicking on things, adding technique and directive...) didn't show any suspicious behavior nor error in console. Node inventories, too.

Tested with change validation plugin, too, to check that adapted validation pop-up are still ok.

clarktsiory avatar Jun 21 '24 05:06 clarktsiory

PR updated with a new commit

clarktsiory avatar Jun 21 '24 05:06 clarktsiory

PR updated with a new commit

clarktsiory avatar Jun 21 '24 06:06 clarktsiory

Superseded by https://github.com/Normation/rudder/pull/5748

clarktsiory avatar Jul 10 '24 07:07 clarktsiory