Skip to content
Permalink
Browse files

Insures contents between nowiki tags and the tags themselves are pres…

…erved on re-loading page.
  • Loading branch information...
turnermm committed Jun 3, 2019
1 parent 41d332d commit e66b4733e0af6257ed386c18b5007bb97ba5d796
Showing with 6 additions and 3 deletions.
  1. +6 −3 action/edit.php
@@ -342,9 +342,8 @@ function($matches) {
$text
);
$text = preg_replace('/TPRE_CLOSE\s+/ms',"TPRE_CLOSE",$text);
$text = preg_replace('/<(?!code|file|del|sup|sub|\/\/|\s|\/del|\/code|\/file|\/sup|\/sub)/ms',"&lt;",$text);
$text = preg_replace('/<(?!code|file|nowiki|del|sup|sub|\/\/|\s|\/del|\/code|\/nowiki|\/file|\/sup|\/sub)/ms',"&lt;",$text);
$text = str_replace(array('<nowiki>','</nowiki>'),array('NWIKISTART<nowiki>','NWIKICLOSE</nowiki>'),$text);
$text = str_replace('%%&lt;', '&#37;&#37;&#60;', $text);
}
@@ -1198,6 +1197,10 @@ function ($matches) {
$data = array($mode,& $Renderer->doc);
trigger_event('RENDERER_CONTENT_POSTPROCESS',$data);
$xhtml = $Renderer->doc;
$xhtml = str_replace(
array('NWIKISTART','NWIKICLOSE'),
array('&amp;lt;nowiki>','&amp;lt;/nowiki>'),$xhtml);
if(!$skip_styling) { // create font styles from font plugin markup for html display
$xhtml = preg_replace_callback(
'|&amp;lt;font\s+(.*?)/([\w ,\-]+);;([\(\)),\w,\s\#]+);;([\(\)),\w,\s\#]+)&gt;(.*?)&amp;lt;/font&gt;|ms',

0 comments on commit e66b473

Please sign in to comment.
You can’t perform that action at this time.