Changeset 47
- Timestamp:
- 04/22/2006 08:27:17 AM (4 years ago)
- Location:
- trunk
- Files:
-
- 2 modified
-
formatters/wakka.php (modified) (2 diffs)
-
wikka.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/formatters/wakka.php
r4 r47 125 125 { 126 126 $url = $matches[1]; 127 if (preg_match("/^(.*)\.(gif|jpg|png)/si", $url)) { 128 return "<img src=\"$url\" alt=\"image\" />".$matches[2]; 129 } else 127 /* Inline images are disabled for security reason, use {{image action}} #142 128 But if you still need this functionality, update this file like below 129 if (preg_match("/\.(gif|jpg|png|svg)$/si", $url)) { 130 return '<img src="'.$wakka->Link($url).'" alt="image" />'.$wakka->htmlspecialchars_ent($matches[2]); 131 } else */ 130 132 // Mind Mapping Mod 131 if (preg_match("/ ^(.*)\.(mm)/si", $url)) {133 if (preg_match("/\.(mm)$/si", $url)) { #145 132 134 return $wakka->Action("mindmap ".$url); 133 135 } else … … 191 193 { 192 194 /* 193 * Note: this routine is rewritten such that (new) language formatters194 * will automatically be found, whether they are GeSHi language config files195 * or "internal" Wikka formatters.196 * Path to GeSHi language files and Wikka formatters MUST be defined in config.197 * For line numbering (GeSHi only) a starting line can be specified after the language198 * code, separated by a ; e.g., %%(php;27)....%%.199 * Specifying >= 1 turns on line numbering if this is enabled in the configuration.200 */195 * Note: this routine is rewritten such that (new) language formatters 196 * will automatically be found, whether they are GeSHi language config files 197 * or "internal" Wikka formatters. 198 * Path to GeSHi language files and Wikka formatters MUST be defined in config. 199 * For line numbering (GeSHi only) a starting line can be specified after the language 200 * code, separated by a ; e.g., %%(php;27)....%%. 201 * Specifying >= 1 turns on line numbering if this is enabled in the configuration. 202 */ 201 203 $code = $matches[1]; 202 204 // if configuration path isn't set, make sure we'll get an invalid path so we -
trunk/wikka.php
r46 r47 636 636 // escape text? 637 637 if ($escapeText) $text = $this->htmlspecialchars_ent($text); 638 $tag = $this->htmlspecialchars_ent($tag); #142 & #148 639 $method = $this->htmlspecialchars_ent($method); 640 $title = $this->htmlspecialchars_ent($title); 638 641 $url = ''; 639 642 … … 1156 1159 exit; 1157 1160 } 1158 #Fix lowercase mod_rewrite bug: Url rewritting lowercases the page name. 1161 1162 // start session 1163 session_start(); 1164 1165 // fetch wakka location 1166 $wakka = $_REQUEST["wakka"]; 1167 1168 // remove leading slash 1169 $wakka = preg_replace("/^\//", "", $wakka); 1170 1171 // split into page/method 1172 if (preg_match("#^(.+?)/(.*)$#", $wakka, $matches)) list(, $page, $method) = $matches; 1173 else if (preg_match("#^(.*)$#", $wakka, $matches)) list(, $page) = $matches; 1174 #Fix lowercase mod_rewrite bug: Url rewritting lowercases the page name. #135 1159 1175 if (strtolower($page) == $page) 1160 1176 { … … 1165 1181 } 1166 1182 } 1167 1168 // start session1169 session_start();1170 1171 // fetch wakka location1172 $wakka = $_REQUEST["wakka"];1173 1174 // remove leading slash1175 $wakka = preg_replace("/^\//", "", $wakka);1176 1177 // split into page/method1178 if (preg_match("#^(.+?)/(.*)$#", $wakka, $matches)) list(, $page, $method) = $matches;1179 else if (preg_match("#^(.*)$#", $wakka, $matches)) list(, $page) = $matches;1180 1183 1181 1184 // create wakka object