Skip to content
This repository has been archived by the owner on Aug 4, 2019. It is now read-only.

Commit

Permalink
[FIXED #39] Stylesheetparser Issue
Browse files Browse the repository at this point in the history
  • Loading branch information
w8tcha committed Aug 19, 2018
1 parent 7562d15 commit 724a942
Show file tree
Hide file tree
Showing 15 changed files with 54 additions and 24 deletions.
2 changes: 1 addition & 1 deletion CKEditorDefaultSettings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<BrowserRoles>0;Administrators;</BrowserRoles>
<AllowedImageExtensions>bmp,gif,jpeg,jpg,png,svg</AllowedImageExtensions>
<SettingMode>Portal</SettingMode>
<Config allowedContent="true" autoGrow_bottomSpace="0" autoGrow_maxHeight="0" autoGrow_minHeight="200" autoGrow_onStartup="false" autoParagraph="true" autoUpdateElement="true" baseFloatZIndex="10000" basicEntities="true" browserContextMenuOnCtrl="true" clipboard_defaultContentType="html" colorButton_colors="00923E,F8C100,28166F" colorButton_enableMore="true" contentsLangDirection="Inherit" dataIndentationChars=" " defaultLanguage="en" defaultLinkType="url" dialog_backgroundCoverColor="white" dialog_backgroundCoverOpacity="0.5" dialog_buttonsOrder="OS" dialog_magnetDistance="20" dialog_noConfirmCancel="0" dialog_startupFocusTab="false" disableNativeSpellChecker="true" disableNativeTableHandles="true" disableObjectResizing="false" disableReadonlyStyling="false" div_wrapTable="false" docType="&lt;!DOCTYPE html&gt;" embed_provider="//ckeditor.iframe.ly/api/oembed?url={url}&amp;callback={callback}" enableTabKeyTools="true" enterMode="P" entities="true" entities_additional="#39" entities_greek="false" entities_latin="false" entities_processNumerical="false" extraPlugins="autosave,mathjax,embed,tableresize,textselection,notification,stylesheetparser,qrcodes,newsarticleslinks,codemirror,codesnippet,dnnpages,xmltemplates,wordcount" filebrowserWindowFeatures="location=no,menubar=no,toolbar=no,dependent=yes,minimizable=no,modal=yes,alwaysRaised=yes,resizable=yes,scrollbars=yes" filebrowserWindowHeight="70%" filebrowserWindowWidth="80%" fillEmptyBlocks="true" flashAddEmbedTag="false" flashConvertOnEdit="false" flashEmbedTagOnly="false" floatSpaceDockedOffsetX="0" floatSpaceDockedOffsetY="0" floatSpacePinnedOffsetX="0" floatSpacePinnedOffsetY="0" fontSize_sizes="12px;2.3em;130%;larger;x-small" font_names="Arial;Times New Roman;Verdana" forceEnterMode="false" forcePasteAsPlainText="false" forceSimpleAmpersand="false" format_tags="p;h1;h2;h3;h4;h5;h6;pre;address;div" fullPage="false" height="200" htmlEncodeOutput="false" ignoreEmptyParagraph="true" image_previewText="Lorem ipsum dolor..." image_removeLinkByEmptyURL="true" indentOffset="40" indentUnit="px" linkJavaScriptLinksAllowed="false" linkShowAdvancedTab="true" linkShowTargetTab="true" magicline_color="#FF0000" magicline_holdDistance="0.5" magicline_keystrokeNext="0" magicline_keystrokePrevious="0" magicline_putEverywhere="false" magicline_triggerOffset="30" menu_groups="clipboard,tablecell,tablecellproperties,tablerow,tablecolumn,table,anchor,link,image,flash,checkbox,radio,textfield,hiddenfield,imagebutton,button,select,textarea,div" mathJaxLib="//cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.2/MathJax.js?config=TeX-AMS_HTML" menu_subMenuDelay="400" pasteFromWordCleanupFile="" pasteFromWordNumberedHeadingToList="false" pasteFromWordPromptCleanup="false" pasteFromWordRemoveFontStyles="true" pasteFromWordRemoveStyles="true" protectedSource="[( /&lt;i class[\s\S]*?&gt;[\s\S]*?&lt;\/i&gt;/gi ),( /&lt;span class[\s\S]*?&gt;&lt;\/span&gt;/gi ),( /&lt;em class[\s\S]*?&gt;[\s\S]*?&lt;\/em&gt;/gi ),( /&lt;button class[\s\S]*?&gt;[\s\S]*?&lt;\/button&gt;/gi )]" readOnly="false" removeFormatAttributes="class,style,lang,width,height,align,hspace,valign" removeFormatTags="b,big,code,del,dfn,em,font,i,ins,kbd,q,samp,small,span,strike,strong,sub,sup,tt,u,var" resize_dir="both" resize_enabled="true" resize_maxHeight="600" resize_maxWidth="3000" resize_minHeight="250" resize_minWidth="750" scayt_autoStartup="false" scayt_maxSuggestions="0" shiftEnterMode="BR" skin="moono-lisa" smiley_columns="8" sourceAreaTabSize="20" startupFocus="false" startupMode="wysiwyg" startupOutlineBlocks="false" startupShowBorders="true" tabIndex="0" tabSpaces="0" templates="default" templates_replaceContent="true" toolbarCanCollapse="false" toolbarGroupCycling="true" toolbarLocation="Top" toolbarStartupExpanded="true" undoStackSize="20" useComputedState="true" width="99%" ResizeImageOnQuickUpload="false" ResizeImageQuality="80">
<Config allowedContent="true" autoGrow_bottomSpace="0" autoGrow_maxHeight="0" autoGrow_minHeight="200" autoGrow_onStartup="false" autoParagraph="true" autoUpdateElement="true" baseFloatZIndex="10000" basicEntities="true" browserContextMenuOnCtrl="true" clipboard_defaultContentType="html" colorButton_colors="00923E,F8C100,28166F" colorButton_enableMore="true" contentsLangDirection="Inherit" dataIndentationChars=" " defaultLanguage="en" defaultLinkType="url" dialog_backgroundCoverColor="white" dialog_backgroundCoverOpacity="0.5" dialog_buttonsOrder="OS" dialog_magnetDistance="20" dialog_noConfirmCancel="0" dialog_startupFocusTab="false" disableNativeSpellChecker="true" disableNativeTableHandles="true" disableObjectResizing="false" disableReadonlyStyling="false" div_wrapTable="false" docType="&lt;!DOCTYPE html&gt;" embed_provider="//ckeditor.iframe.ly/api/oembed?url={url}&amp;callback={callback}" enableTabKeyTools="true" enterMode="P" entities="true" entities_additional="#39" entities_greek="false" entities_latin="false" entities_processNumerical="false" extraPlugins="autosave,mathjax,embed,tableresize,textselection,notification,stylesheetparser,qrcodes,newsarticleslinks,codemirror,codesnippet,dnnpages,xmltemplates,wordcount" filebrowserWindowFeatures="location=no,menubar=no,toolbar=no,dependent=yes,minimizable=no,modal=yes,alwaysRaised=yes,resizable=yes,scrollbars=yes" filebrowserWindowHeight="70%" filebrowserWindowWidth="80%" fillEmptyBlocks="true" flashAddEmbedTag="false" flashConvertOnEdit="false" flashEmbedTagOnly="false" floatSpaceDockedOffsetX="0" floatSpaceDockedOffsetY="0" floatSpacePinnedOffsetX="0" floatSpacePinnedOffsetY="0" fontSize_sizes="12px;2.3em;130%;larger;x-small" font_names="Arial;Times New Roman;Verdana" forceEnterMode="false" forcePasteAsPlainText="false" forceSimpleAmpersand="false" format_tags="p;h1;h2;h3;h4;h5;h6;pre;address;div" fullPage="false" height="200" htmlEncodeOutput="false" ignoreEmptyParagraph="true" image_previewText="Lorem ipsum dolor..." image_removeLinkByEmptyURL="true" indentOffset="40" indentUnit="px" linkJavaScriptLinksAllowed="false" linkShowAdvancedTab="true" linkShowTargetTab="true" magicline_color="#FF0000" magicline_holdDistance="0.5" magicline_keystrokeNext="0" magicline_keystrokePrevious="0" magicline_putEverywhere="false" magicline_triggerOffset="30" menu_groups="clipboard,tablecell,tablecellproperties,tablerow,tablecolumn,table,anchor,link,image,flash,checkbox,radio,textfield,hiddenfield,imagebutton,button,select,textarea,div" mathJaxLib="//cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.2/MathJax.js?config=TeX-AMS_HTML" menu_subMenuDelay="400" pasteFromWordCleanupFile="" pasteFromWordNumberedHeadingToList="false" pasteFromWordPromptCleanup="false" pasteFromWordRemoveFontStyles="true" pasteFromWordRemoveStyles="true" protectedSource="[( /&lt;i class[\s\S]*?&gt;[\s\S]*?&lt;\/i&gt;/gi ),( /&lt;span class[\s\S]*?&gt;&lt;\/span&gt;/gi ),( /&lt;em class[\s\S]*?&gt;[\s\S]*?&lt;\/em&gt;/gi ),( /&lt;button class[\s\S]*?&gt;[\s\S]*?&lt;\/button&gt;/gi )]" readOnly="false" removeFormatAttributes="class,style,lang,width,height,align,hspace,valign" removeFormatTags="b,big,code,del,dfn,em,font,i,ins,kbd,q,samp,small,span,strike,strong,sub,sup,tt,u,var" resize_dir="both" resize_enabled="true" resize_maxHeight="600" resize_maxWidth="3000" resize_minHeight="250" resize_minWidth="750" scayt_autoStartup="false" scayt_maxSuggestions="0" shiftEnterMode="BR" skin="moono-lisa" smiley_columns="8" sourceAreaTabSize="20" startupFocus="false" startupMode="wysiwyg" startupOutlineBlocks="false" startupShowBorders="true" stylesheetParser_skipSelectors="/(^body\.|^html\.|^caption\.|\.high|^\.)/i" tabIndex="0" tabSpaces="0" templates="default" templates_replaceContent="true" toolbarCanCollapse="false" toolbarGroupCycling="true" toolbarLocation="Top" toolbarStartupExpanded="true" undoStackSize="20" useComputedState="true" width="99%" ResizeImageOnQuickUpload="false" ResizeImageQuality="80">
<CodeMirror autoCloseBrackets="true" autoCloseTags="false" autoFormatOnStart="false" autoFormatOnUncomment="true" continueComments="true" enableCodeFolding="true" enableCodeFormatting="true" enableSearchTools="true" highlightMatches="true" indentWithTabs="false" lineNumbers="true" lineWrapping="true" mode="htmlmixed" matchBrackets="true" matchTags="true" showAutoCompleteButton="true" showCommentButton="true" showFormatButton="true" showSearchButton="true" showTrailingSpace="true" showUncommentButton="true" highlightActiveLine="true" theme="default" useBeautifyOnStart="false" />
<AutoSave delay="10" messageType="notification" saveDetectionSelectors="a[href^='javascript:__doPostBack'][id*='Save'],a[id*='Cancel']" NotOlderThen="1440" diffType="sideBySide" autoLoad="false" />
<WordCount showParagraphs="true" showCharCount="false" showWordCount="true" countSpacesAsChars="false" countHTML="false" maxCharCount="-1" maxWordCount="-1" />
Expand Down
7 changes: 3 additions & 4 deletions DNN 7/Install/CKReleaseNotes.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,17 @@
<title>CKEditor Provider Readme</title>
</head>
<body>
<h1>CKEditor 4.9.2 Editor Provider 2.01.16 <small>For DNN® Platform 07.04.02 (or above)</small></h1>
<h1>CKEditor 4.10.0 Editor Provider 2.01.17 <small>For DNN® Platform 07.04.02 (or above)</small></h1>
<h4>What's New</h4>
<div class="dnnFormMessage dnnFormSuccess">
<ul>
<li>Upgraded to CKEditor 4.9.2</li>
<li>Upgraded to CKEditor 4.10.0</li>
</ul>
</div>
<h5>changes</h5>
<div class="dnnFormMessage dnnFormInfo">
<ul>
<li>Fixed loading of Custom Plugin config settings</li>
<li>Set Default Notifications for the Autosave Plugin to 10 seconds</li>
<li>[FIXED #39] Stylesheetparser Issue</li>
</ul>
</div>
</body>
Expand Down
4 changes: 2 additions & 2 deletions DNN 7/Install/WatchersNET.CKHtmlEditorProvider.dnn
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<dotnetnuke type="Package" version="5.0">
<packages><package name="DotNetNuke.CKHtmlEditorProvider" type="Provider" version="02.01.16">
<packages><package name="DotNetNuke.CKHtmlEditorProvider" type="Provider" version="02.01.17">
<friendlyName>CKEditor Editor Provider</friendlyName>
<description>CKEditor Editor Provider for DNN</description>
<iconFile>~/Providers/HtmlEditorProviders/CKEditor/LogoCKEditor.png</iconFile>
Expand Down Expand Up @@ -107,7 +107,7 @@
<component type="Cleanup" version="02.00.00" fileName="02.00.00.Cleanup.txt" />
</components>
</package>
<package name="CKEditor.EditorConfigManager" type="Module" version="02.01.16">
<package name="CKEditor.EditorConfigManager" type="Module" version="02.01.17">
<friendlyName>CKEditor Config Manager</friendlyName>
<description>Configuration Manager for the CKEditor Editor Provider</description>
<owner>
Expand Down
Binary file modified DNN 7/Install/bin/WatchersNET.CKEditor.dll
Binary file not shown.
11 changes: 11 additions & 0 deletions DNN 7/Objects/EditorConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ public EditorConfig()
this.StartupMode = "wysiwyg";
this.StartupOutlineBlocks = false;
this.StartupShowBorders = true;
this.StylesheetParser_skipSelectors = "/(^body\\.|^html\\.|^caption\\.|\\.high|^\\.)/i";
this.TabIndex = 0;
this.TabSpaces = 0;
this.Templates = "default";
Expand Down Expand Up @@ -1794,6 +1795,16 @@ public EditorConfig()
[Description("The 'styles definition set' to use in the editor. They will be used in the styles combo and the style selector of the div container.")]
public string StylesSet { get; set; }

/// <summary>
/// Gets or sets the stylesheet parser skip selectors.
/// </summary>
/// <value>
/// The stylesheet parser skip selectors.
/// </value>
[XmlAttribute("stylesheetParser_skipSelectors")]
[Description("A regular expression that defines whether a CSS rule will be skipped by the Stylesheet Parser plugin. ")]
public string StylesheetParser_skipSelectors { get; set; }

/// <summary>
/// Gets or sets the index of the tab.
/// </summary>
Expand Down
2 changes: 1 addition & 1 deletion DNN 7/Web/CKEditorControl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1544,7 +1544,7 @@ private void GenerateEditorLoadScript()
continue;
}

editorScript.AppendFormat("{0}:\'{1}\'", key, value);
editorScript.AppendFormat(value.EndsWith("/i") ? "{0}:{1}" : "{0}:\'{1}\'", key, value);

editorScript.Append(currentCount == keysCount ? "};" : ",");
}
Expand Down
7 changes: 3 additions & 4 deletions DNN 8/Install/CKReleaseNotes.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,17 @@
<title>CKEditor Provider Readme</title>
</head>
<body>
<h1>CKEditor 4.9.2 Editor Provider 2.01.16 <small>For DNN® Platform 08.00.04 (or above)</small></h1>
<h1>CKEditor 4.10.0 Editor Provider 2.01.17 <small>For DNN® Platform 08.00.04 (or above)</small></h1>
<h4>What's New</h4>
<div class="dnnFormMessage dnnFormSuccess">
<ul>
<li>Upgraded to CKEditor 4.9.2</li>
<li>Upgraded to CKEditor 4.10.0</li>
</ul>
</div>
<h5>changes</h5>
<div class="dnnFormMessage dnnFormInfo">
<ul>
<li>Fixed loading of Custom Plugin config settings</li>
<li>Set Default Notifications for the Autosave Plugin to 10 seconds</li>
<li>[FIXED #39] Stylesheetparser Issue</li>
</ul>
</div>
</body>
Expand Down
4 changes: 2 additions & 2 deletions DNN 8/Install/WatchersNET.CKHtmlEditorProvider.dnn
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<dotnetnuke type="Package" version="5.0">
<packages><package name="DotNetNuke.CKHtmlEditorProvider" type="Provider" version="02.01.16">
<packages><package name="DotNetNuke.CKHtmlEditorProvider" type="Provider" version="02.01.17">
<friendlyName>CKEditor Editor Provider</friendlyName>
<description>CKEditor Editor Provider for DNN</description>
<iconFile>~/Providers/HtmlEditorProviders/CKEditor/LogoCKEditor.png</iconFile>
Expand Down Expand Up @@ -108,7 +108,7 @@
<component type="Cleanup" version="02.00.00" fileName="02.00.00.Cleanup.txt" />
</components>
</package>
<package name="CKEditor.EditorConfigManager" type="Module" version="02.01.16">
<package name="CKEditor.EditorConfigManager" type="Module" version="02.01.17">
<friendlyName>CKEditor Config Manager</friendlyName>
<description>Configuration Manager for the CKEditor Editor Provider</description>
<owner>
Expand Down
11 changes: 11 additions & 0 deletions DNN 8/Objects/EditorConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ public EditorConfig()
this.StartupMode = "wysiwyg";
this.StartupOutlineBlocks = false;
this.StartupShowBorders = true;
this.StylesheetParser_skipSelectors = "/(^body\\.|^html\\.|^caption\\.|\\.high|^\\.)/i";
this.TabIndex = 0;
this.TabSpaces = 0;
this.Templates = "default";
Expand Down Expand Up @@ -1793,6 +1794,16 @@ public EditorConfig()
[Description("The 'styles definition set' to use in the editor. They will be used in the styles combo and the style selector of the div container.")]
public string StylesSet { get; set; }

/// <summary>
/// Gets or sets the stylesheet parser skip selectors.
/// </summary>
/// <value>
/// The stylesheet parser skip selectors.
/// </value>
[XmlAttribute("stylesheetParser_skipSelectors")]
[Description("A regular expression that defines whether a CSS rule will be skipped by the Stylesheet Parser plugin. ")]
public string StylesheetParser_skipSelectors { get; set; }

/// <summary>
/// Gets or sets the index of the tab.
/// </summary>
Expand Down
2 changes: 1 addition & 1 deletion DNN 8/Web/CKEditorControl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1527,7 +1527,7 @@ private void GenerateEditorLoadScript()
continue;
}

editorScript.AppendFormat("{0}:\'{1}\'", key, value);
editorScript.AppendFormat(value.EndsWith("/i") ? "{0}:{1}" : "{0}:\'{1}\'", key, value);

editorScript.Append(currentCount == keysCount ? "};" : ",");
}
Expand Down
7 changes: 3 additions & 4 deletions DNN 9/Install/CKReleaseNotes.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,17 @@
<title>CKEditor Provider Readme</title>
</head>
<body>
<h1>CKEditor 4.9.2 Editor Provider 2.01.16 <small>For DNN® Platform 09.01.01 (or above)</small></h1>
<h1>CKEditor 4.10.0 Editor Provider 2.01.17 <small>For DNN® Platform 09.01.01 (or above)</small></h1>
<h4>What's New</h4>
<div class="dnnFormMessage dnnFormSuccess">
<ul>
<li>Upgraded to CKEditor 4.9.2</li>
<li>Upgraded to CKEditor 4.10.0</li>
</ul>
</div>
<h5>changes</h5>
<div class="dnnFormMessage dnnFormInfo">
<ul>
<li>Fixed loading of Custom Plugin config settings</li>
<li>Set Default Notifications for the Autosave Plugin to 10 seconds</li>
<li>[FIXED #39] Stylesheetparser Issue</li>
</ul>
</div>
</body>
Expand Down
4 changes: 2 additions & 2 deletions DNN 9/Install/WatchersNET.CKHtmlEditorProvider.dnn
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<dotnetnuke type="Package" version="5.0">
<packages><package name="DotNetNuke.CKHtmlEditorProvider" type="Provider" version="02.01.16">
<packages><package name="DotNetNuke.CKHtmlEditorProvider" type="Provider" version="02.01.17">
<friendlyName>CKEditor Editor Provider</friendlyName>
<description>CKEditor Editor Provider for DNN</description>
<iconFile>~/Providers/HtmlEditorProviders/CKEditor/LogoCKEditor.png</iconFile>
Expand Down Expand Up @@ -108,7 +108,7 @@
<component type="Cleanup" version="02.00.00" fileName="02.00.00.Cleanup.txt" />
</components>
</package>
<package name="CKEditor.EditorConfigManager" type="Module" version="02.01.16">
<package name="CKEditor.EditorConfigManager" type="Module" version="02.01.17">
<friendlyName>CKEditor Config Manager</friendlyName>
<description>Configuration Manager for the CKEditor Editor Provider</description>
<owner>
Expand Down
11 changes: 11 additions & 0 deletions DNN 9/Objects/EditorConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ public EditorConfig()
this.StartupMode = "wysiwyg";
this.StartupOutlineBlocks = false;
this.StartupShowBorders = true;
this.StylesheetParser_skipSelectors = "/(^body\\.|^html\\.|^caption\\.|\\.high|^\\.)/i";
this.TabIndex = 0;
this.TabSpaces = 0;
this.Templates = "default";
Expand Down Expand Up @@ -1793,6 +1794,16 @@ public EditorConfig()
[Description("The 'styles definition set' to use in the editor. They will be used in the styles combo and the style selector of the div container.")]
public string StylesSet { get; set; }

/// <summary>
/// Gets or sets the stylesheet parser skip selectors.
/// </summary>
/// <value>
/// The stylesheet parser skip selectors.
/// </value>
[XmlAttribute("stylesheetParser_skipSelectors")]
[Description("A regular expression that defines whether a CSS rule will be skipped by the Stylesheet Parser plugin. ")]
public string StylesheetParser_skipSelectors { get; set; }

/// <summary>
/// Gets or sets the index of the tab.
/// </summary>
Expand Down
2 changes: 1 addition & 1 deletion DNN 9/Web/CKEditorControl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1552,7 +1552,7 @@ private void GenerateEditorLoadScript()
continue;
}

editorScript.AppendFormat("{0}:\'{1}\'", key, value);
editorScript.AppendFormat(value.EndsWith("/i") ? "{0}:{1}" : "{0}:\'{1}\'", key, value);

editorScript.Append(currentCount == keysCount ? "};" : ",");
}
Expand Down
4 changes: 2 additions & 2 deletions GlobalAssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@

[assembly: ComVisible(false)]

[assembly: AssemblyVersion("2.01.16")]
[assembly: AssemblyFileVersion("2.01.1.6")]
[assembly: AssemblyVersion("2.01.17")]
[assembly: AssemblyFileVersion("2.01.1.7")]

0 comments on commit 724a942

Please sign in to comment.