Fixed and closed #394: page name is properly encoded when passed to Popup.aspx or PopupWYSIWYG.aspx.

This commit is contained in:
Dario Solera 2009-10-21 14:27:10 +00:00
parent 1f665bda61
commit d460d9bd47
4 changed files with 6 additions and 5 deletions

View file

@ -16,5 +16,5 @@ using System.Reflection;
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("3.0.1.409")]
[assembly: AssemblyFileVersion("3.0.1.409")]
[assembly: AssemblyVersion("3.0.1.410")]
[assembly: AssemblyFileVersion("3.0.1.410")]

View file

@ -352,6 +352,7 @@
var settings = "center=yes,resizable=yes,dialog,status=no,scrollbars=no,width=300,height=300";
var w;
//added for WYSIWYG
// CurrentPage is escaped in code-behind
if(mode == 'WYSIWYG')
w = window.open(CurrentNamespace + "PopupWYSIWYG.aspx?Feature=" + feature + (CurrentPage != "" ? "&CurrentPage=" + CurrentPage : ""), "Popup", settings);
//end

View file

@ -22,8 +22,8 @@ namespace ScrewTurn.Wiki {
sb.Append("<script type=\"text/javascript\">\r\n<!--\r\n");
sb.AppendFormat("\tvar MarkupControl = \"{0}\";\r\n", txtMarkup.ClientID);
sb.AppendFormat("\tvar VisualControl = \"{0}\";\r\n", lblWYSIWYG.ClientID);
sb.AppendFormat("\tvar CurrentPage = \"{0}\";\r\n", (currentPage != null ? currentPage.FullName : ""));
sb.AppendFormat("\tvar CurrentNamespace = \"{0}\";\r\n", currentNamespaceName);
sb.AppendFormat("\tvar CurrentPage = \"{0}\";\r\n", (currentPage != null ? Tools.UrlEncode(currentPage.FullName) : ""));
sb.AppendFormat("\tvar CurrentNamespace = \"{0}\";\r\n", Tools.UrlEncode(currentNamespaceName));
sb.Append("// -->\r\n</script>");
lblStrings.Text = sb.ToString();

View file

@ -1,7 +1,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:2.0.50727.4016
// Runtime Version:2.0.50727.4927
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.