mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-28 23:03:25 +09:00
on* 자바스크립트 이벤트 처리방법을 변경하여 에디터 컴포넌트의 오류 수정. xe_default, 에디터 스킨의 position 스타일로 인한 문제 해결
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@4822 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
ce50669486
commit
b2c09362fc
9 changed files with 33 additions and 36 deletions
|
|
@ -474,8 +474,11 @@
|
|||
}
|
||||
|
||||
function removeJSEvent($matches) {
|
||||
if(preg_match('/(src|href|lowsrc|dynsrc)=("|\'?)([\r\n]*)javascript/is',$matches[2])) $matches[0] = preg_replace('/(src|href|lowsrc|dynsrc)=("|\'?)([\r\n]*)javascript/is','$1=$2_javascript', $matches[0]);
|
||||
return preg_replace('/([\r\n ]*)on([a-z]+)=/is',' _on$2=',$matches[0]);
|
||||
$content = $matches[0];
|
||||
if(preg_match('/(src|href|lowsrc|dynsrc)=("|\'?)([\r\n]*)(vbscript|javascript)/is',$matches[2])) $content = preg_replace('/(src|href|lowsrc|dynsrc)=("|\'?)([\r\n]*)(vbscript|javascript)/is','$1=$2_$4', $content);
|
||||
$content = preg_replace('/([\r\n ]*)on([a-z]+)=/is',' _on$2=',$content);
|
||||
$content = preg_replace('/_onclick=("|\')window\.open\(this\.href\);(.?)return false;("|\')/i','onclick=$1window.open(this.href);$2return false;$3',$content);
|
||||
return str_replace('editor_comp _onent', 'editor_component', $content);
|
||||
}
|
||||
|
||||
function removeSrcHack($matches) {
|
||||
|
|
@ -500,7 +503,6 @@
|
|||
|
||||
function _isHackedSrc($src) {
|
||||
if(!$src) return false;
|
||||
if($src && preg_match('/javascript:/i',$src)) return true;
|
||||
if($src) {
|
||||
$url_info = parse_url($src);
|
||||
$query = $url_info['query'];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue