Skip to content

Commit

Permalink
naver#194 Online editor replaces " with " in scripts
Browse files Browse the repository at this point in the history
  - modify convert escape
  • Loading branch information
geunwoo son committed Sep 23, 2016
1 parent 3a94832 commit 78c0245
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*
/*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
Expand All @@ -9,7 +9,7 @@
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* limitations under the License.
*/
package org.ngrinder.script.repository;

Expand Down Expand Up @@ -248,7 +248,7 @@ public FileEntry findOne(User user, String path, SVNRevision revision) {
script.setFileType(FileType.getFileTypeByExtension(FilenameUtils.getExtension(script.getFileName())));
if (script.getFileType().isEditable()) {
String autoDetectedEncoding = EncodingUtils.detectEncoding(byteArray, "UTF-8");
script.setContent(new String(byteArray, autoDetectedEncoding));
script.setContent((new String(byteArray, autoDetectedEncoding)).replaceAll(""","\""));
script.setEncoding(autoDetectedEncoding);
script.setContentBytes(byteArray);
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@


<textarea id="codemirror_content">${((file.content)!"")?replace("&para", "&amp;para")}</textarea>
<textarea id="old_content" class="hidden">${(file.content)!}</textarea>
<textarea id="old_content" class="hidden">${((file.content)!"")?replace("&para", "&amp;para")}</textarea>
<div class="pull-right" rel="popover" style="float;margin-top:-20px;margin-right:-30px;cursor: pointer"
title="Tip" data-html="ture"
data-placement="left"
Expand Down Expand Up @@ -183,7 +183,7 @@
$("#save_btn").click(function() {
var newContent = editor.getValue();
if ($("#oldContent").val() != newContent) {
if ($("#old_content").val() != newContent) {
$("#validated").val("0");
}
$('#contentHd').val(newContent);
Expand Down

0 comments on commit 78c0245

Please sign in to comment.