Skip to main content
added 1 character in body
Source Link
sfdcfox
  • 501.8k
  • 21
  • 473
  • 828

It does exactly what it says it does. It captures an execCommand call, checks if the first parameter is innerHTMLinsertHTML, and if so, sanitizes the input using the LWS HTML sanitation function. After that, the real function is called using the first parameter, and the real or sanitized second parameter, if any. This is the same function that's called to make sure templates and other code can't execute direct scripts that may be outside of the LWS sandbox.

It does exactly what it says it does. It captures an execCommand call, checks if the first parameter is innerHTML, and if so, sanitizes the input using the LWS HTML sanitation function. After that, the real function is called using the first parameter, and the real or sanitized second parameter, if any. This is the same function that's called to make sure templates and other code can't execute direct scripts that may be outside of the LWS sandbox.

It does exactly what it says it does. It captures an execCommand call, checks if the first parameter is insertHTML, and if so, sanitizes the input using the LWS HTML sanitation function. After that, the real function is called using the first parameter, and the real or sanitized second parameter, if any. This is the same function that's called to make sure templates and other code can't execute direct scripts that may be outside of the LWS sandbox.

Source Link
sfdcfox
  • 501.8k
  • 21
  • 473
  • 828

It does exactly what it says it does. It captures an execCommand call, checks if the first parameter is innerHTML, and if so, sanitizes the input using the LWS HTML sanitation function. After that, the real function is called using the first parameter, and the real or sanitized second parameter, if any. This is the same function that's called to make sure templates and other code can't execute direct scripts that may be outside of the LWS sandbox.