github-advanced-security[bot] commented on code in PR #3130:
URL: 
https://github.com/apache/incubator-kie-tools/pull/3130#discussion_r2086097008


##########
packages/online-editor/src/editor/Toolbar/Share/EmbedModal.tsx:
##########
@@ -94,7 +94,7 @@
   const isGist = useMemo(() => props.workspace.origin.kind === 
WorkspaceKind.GITHUB_GIST, [props.workspace]);
 
   const getCurrentContentScript = useCallback((content: string, libraryName: 
string) => {
-    const fileContent = content.replace(/(\r\n|\n|\r)/gm, "");
+    const fileContent = content.replace(/(\r\n|\n|\r)/gm, "").replace(/'/g, 
"\\'");

Review Comment:
   ## Incomplete string escaping or encoding
   
   This does not escape backslash characters in the input.
   
   [Show more 
details](https://github.com/apache/incubator-kie-tools/security/code-scanning/1021)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to