mirror of
https://github.com/theonedev/onedev.git
synced 2025-12-08 18:26:30 +00:00
Fix issue #1291 - PullRequest / Commit UI: HTML renders escaped special characters instead of showing the escaped character
This commit is contained in:
parent
7fe44bda02
commit
9dfb37ed42
@ -360,10 +360,9 @@ public class BlobTextDiffPanel extends Panel {
|
||||
StringBuilder builder = new StringBuilder();
|
||||
appendEquals(builder, index, lastContextSize, contextSize);
|
||||
|
||||
String expanded = StringUtils.replace(builder.toString(), "\"", "\\\"");
|
||||
expanded = StringUtils.replace(expanded, "\n", "");
|
||||
String expanded = StringUtils.replace(builder.toString(), "\n", "");
|
||||
String script = String.format("onedev.server.blobTextDiff.expand('%s', %d, \"%s\");",
|
||||
getMarkupId(), index, expanded);
|
||||
getMarkupId(), index, JavaScriptEscape.escapeJavaScript(expanded));
|
||||
target.appendJavaScript(script);
|
||||
break;
|
||||
case "openSelectionPopover":
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user