Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(runtime): replace
innerHTML
with textContent
for CSS injection (
#5207) * fix(runtime): replace `innerHTML` with `textContent` for CSS injection This commit addresses security and performance concerns associated with using `innerHTML` for injecting CSS into `<style>` elements in `bootstrap-lazy.ts`. By switching to `textContent`, the risk of executing malicious scripts is mitigated and performance is improved due to the avoidance of HTML parsing. This change enhances the security and efficiency of Stencil's component initialisation process, particularly in environments with strict security policies like browser extensions, without impacting functionality in standard web applications. fixes: #5206 Signed-off-by: Theodore GARSON <[email protected]> * Update bootstrap-lazy.ts --------- Signed-off-by: Theodore GARSON <[email protected]> Co-authored-by: Alice Pote <[email protected]> Co-authored-by: Alice Pote <[email protected]>
- Loading branch information