Index: lams_tool_wiki/web/includes/css/wiki_style.css =================================================================== RCS file: /usr/local/cvsroot/lams_tool_wiki/web/includes/css/wiki_style.css,v diff -u -r1.1 -r1.2 --- lams_tool_wiki/web/includes/css/wiki_style.css 8 Oct 2008 05:33:01 -0000 1.1 +++ lams_tool_wiki/web/includes/css/wiki_style.css 14 Apr 2014 12:57:18 -0000 1.2 @@ -33,4 +33,9 @@ margin: 0px; } +.error { + color: red; + +} + \ No newline at end of file Index: lams_tool_wiki/web/includes/javascript/validation.js =================================================================== RCS file: /usr/local/cvsroot/lams_tool_wiki/web/includes/javascript/validation.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_wiki/web/includes/javascript/validation.js 14 Apr 2014 12:57:18 -0000 1.1 @@ -0,0 +1,31 @@ + $(function(){ + + $('form input[name="title"]').blur(function () { + var title = $(this).val(); + var re = /^[^<>^#()/\\|'\",{}`]*$/; + if (re.test(title)) { + $('.title').hide(); + } else { + $('.title').show(); + $(this).focus(); + $(this).select(); + } + + }); + + + $('form input[name="newPageTitle"]').blur(function () { + var newPageTitle = $(this).val(); + var re = /^[^<>^#()/\\|'\",{}`]*$/; + if (re.test(newPageTitle)) { + $('.newPageTitle').hide(); + } else { + $('.newPageTitle').show(); + $(this).focus(); + $(this).select(); + } + + }); + + + }); Index: lams_tool_wiki/web/pages/authoring/authoring.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_wiki/web/pages/authoring/authoring.jsp,v diff -u -r1.4 -r1.5 --- lams_tool_wiki/web/pages/authoring/authoring.jsp 17 Jan 2014 22:18:21 -0000 1.4 +++ lams_tool_wiki/web/pages/authoring/authoring.jsp 14 Apr 2014 12:57:18 -0000 1.5 @@ -2,6 +2,10 @@ <%@ page import="org.lamsfoundation.lams.tool.wiki.util.WikiConstants"%> + + + + Index: lams_tool_wiki/web/pages/authoring/basic.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_wiki/web/pages/authoring/basic.jsp,v diff -u -r1.14 -r1.15 --- lams_tool_wiki/web/pages/authoring/basic.jsp 19 Mar 2012 19:36:00 -0000 1.14 +++ lams_tool_wiki/web/pages/authoring/basic.jsp 14 Apr 2014 12:57:18 -0000 1.15 @@ -1,5 +1,9 @@ <%@ include file="/common/taglibs.jsp"%> + + + + @@ -8,9 +12,9 @@ - ${mainWikiPage.title} : + ${fn:escapeXml(mainWikiPage.title)} : - ${currentWikiPage.title} + ${fn:escapeXml(mainWikiPage.title)} @@ -65,7 +69,7 @@ - ${currentWikiPage.title} + @@ -78,7 +82,7 @@ - ${currentWikiPage.currentWikiContentDTO.editorDTO.firstName} ${currentWikiPage.currentWikiContentDTO.editorDTO.lastName} + @@ -92,14 +96,14 @@ - ${currentWikiPage.currentWikiContentDTO.body} + - - ${currentWikiPage.title} + - @@ -134,7 +138,7 @@ - ${wikiContentPageVersion.editorDTO.firstName} ${wikiContentPageVersion.editorDTO.firstName} + @@ -168,14 +172,14 @@ - - ${currentWikiPage.title} + - - + @@ -217,7 +221,7 @@ - + @@ -258,12 +262,12 @@ -${mainWikiPage.title} +${fn:escapeXml(mainWikiPage.title)} - ${wikiPage.title} + ${fn:escapeXml(wikiPage.title)} @@ -278,7 +282,7 @@ function populateWikiLinkArray() { - wikiLinkArray[wikiLinkArray.length] = '${wikiPage.javaScriptTitle}'; + wikiLinkArray[wikiLinkArray.length] = '${fn:escapeXml(wikiPage.javaScriptTitle)}'; @@ -317,7 +321,7 @@ for (i=0; i - ${wikiDTO.title} + - + <%@ page import="org.lamsfoundation.lams.tool.wiki.util.WikiConstants"%> + + + +
- +