Changeset 952
- Timestamp:
- 07/07/10 10:06:37 (2 months ago)
- Location:
- trunk/engine
- Files:
-
- 2 modified
-
lib/external/Jevix/jevix.class.php (modified) (1 diff)
-
modules/text/Text.class.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/engine/lib/external/Jevix/jevix.class.php
r866 r952 954 954 } 955 955 // HTTP в начале если нет 956 if(!preg_match('/^(http|https|ftp):\/\//ui', $value) && !preg_match('/^(\/|\#)/ui', $value) ) $value = 'http://'.$value;956 if(!preg_match('/^(http|https|ftp):\/\//ui', $value) && !preg_match('/^(\/|\#)/ui', $value) && !preg_match('/^(mailto):/ui', $value) ) $value = 'http://'.$value; 957 957 break; 958 958 -
trunk/engine/modules/text/Text.class.php
r916 r952 47 47 */ 48 48 protected function JevixConfig() { 49 // разрешаем в параметрах символ & 50 unset($this->oJevix->entities1['&']); 49 51 // Разрешённые теги 50 52 $this->oJevix->cfgAllowTags(array('cut','a', 'img', 'i', 'b', 'u', 's', 'video', 'em', 'strong', 'nobr', 'li', 'ol', 'ul', 'sup', 'abbr', 'sub', 'acronym', 'h4', 'h5', 'h6', 'br', 'hr', 'pre', 'code', 'object', 'param', 'embed', 'blockquote')); … … 57 59 $this->oJevix->cfgAllowTagParams('a', array('title', 'href', 'rel')); 58 60 $this->oJevix->cfgAllowTagParams('cut', array('name')); 59 $this->oJevix->cfgAllowTagParams('object', array('width' => '#int', 'height' => '#int', 'data' => '#link' ));61 $this->oJevix->cfgAllowTagParams('object', array('width' => '#int', 'height' => '#int', 'data' => '#link', 'type' => '#text')); 60 62 $this->oJevix->cfgAllowTagParams('param', array('name' => '#text', 'value' => '#text')); 61 63 $this->oJevix->cfgAllowTagParams('embed', array('src' => '#image', 'type' => '#text','allowscriptaccess' => '#text', 'allowfullscreen' => '#text','width' => '#int', 'height' => '#int', 'flashvars'=> '#text', 'wmode'=> '#text')); … … 139 141 */ 140 142 protected function FlashParamParser($sText) { 141 if (preg_match_all("@(<\s*param\s*name\s*=\s* \".*\"\s*value\s*=\s*\".*\")\s*/?\s*>(?!</param>)@Ui",$sText,$aMatch)) {143 if (preg_match_all("@(<\s*param\s*name\s*=\s*(?:\"|').*(?:\"|')\s*value\s*=\s*(?:\"|').*(?:\"|'))\s*/?\s*>(?!</param>)@Ui",$sText,$aMatch)) { 142 144 foreach ($aMatch[1] as $key => $str) { 143 145 $str_new=$str.'></param>'; … … 154 156 * Удаляем все <param name="wmode" value="*"></param> 155 157 */ 156 if (preg_match_all("@(<param\s.*name= \"wmode\".*>\s*</param>)@Ui",$sText,$aMatch)) {158 if (preg_match_all("@(<param\s.*name=(?:\"|')wmode(?:\"|').*>\s*</param>)@Ui",$sText,$aMatch)) { 157 159 foreach ($aMatch[1] as $key => $str) { 158 160 $sText=str_replace($aMatch[0][$key],'',$sText);
