Skip to content

Commit

Permalink
added apostrophe escaping for vargrp, fixed editor inconsistency
Browse files Browse the repository at this point in the history
  • Loading branch information
Kyle Brumsted committed Jul 12, 2016
1 parent 53c955e commit 76609a7
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ public static String httpGetWriter(String reqPrefix,String request){
c.buildRequest(RequestType.GET, reqPrefix, request);
c.writerAuthorize();
String s = c.execute();
c.close();
c.close();
return s;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -799,7 +799,6 @@ public int editVarMulti(String baseHandle, String version, String var,
public int editVarGrp(String baseHandle, String version, String id,
String name, String labl, String txt){
//TODO: versioning for this

String handle = baseHandle+version;
String replaceStmt = "";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,7 @@ public String groupEditForm2P(@PathVariable(value = "c") String baseHandle,
break;
case "txt":
txt = newValue;
txt = txt.replaceAll("'", "'");
break;
}

Expand Down
21 changes: 21 additions & 0 deletions Source/src/main/webapp/WEB-INF/ajaxViews/groupFieldEdit.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,27 @@
<c:if test="${newTxtHeight lt 3}">
<c:set var="newTxtHeight" value="3" />
</c:if>
<script src="${baseURI}/scripts/tinymce/tinymce.min.js"></script>
<script type="text/javascript">
$("#editSave").css("display","none");
tinymce.init({
selector: "textarea",
menubar : false,
content_css : "${baseURI}/styles/tinymce.css",
oninit : "setPlainText",
browser_spellcheck : true,
plugins: "paste save link code",
target_list: [{title: 'None', value: ''}],
paste_as_text: true,
toolbar: "save | undo redo | link | bullist | italic | code | git",
valid_elements :"a[href|target=_blank],strong/b,em,div,br,p,li,ul",
save_onsavecallback: function(){
$("textarea [name=newText]").html(this.getContent());
$("#editSave").click();
}
});
</script>
<textarea name="newValue" style="height:${newTxtHeight}em">${curVal}</textarea>
<c:if test="${not empty editDoc}">
<p class="editDoc">${editDoc}</p>
Expand Down

0 comments on commit 76609a7

Please sign in to comment.