mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-26 14:49:56 +09:00
이미지의 절대경로(http://~)를 XE 상대경로로 바꾸는 코드 복원
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@7293 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
f1b917558e
commit
01b7111378
1 changed files with 9 additions and 3 deletions
|
|
@ -261,10 +261,16 @@ xe.XE_GET_WYSYWYG_CONTENT = jQuery.Class({
|
|||
},
|
||||
|
||||
IR_TO_HTMLSrc : function(content) {
|
||||
// src, href, url의 XE 상대경로를 http로 시작하는 full path로 변경
|
||||
content = editorReplacePath(content);
|
||||
// src, href, url에서 http로 시작하는 full path를 XE 상대경로로 변경
|
||||
content = content.replace(/(src=|href=|url\()("|\')*([^"\'\)]+)("|\'|\))*(\s|>|\))*/ig, function(m0,m1,m2,m3,m4,m5) {
|
||||
var uriReg = new RegExp('^'+request_uri.replace('\/','\\/'),'ig');
|
||||
if(m1=="url(") { m2=''; m4=')'; } else { if(typeof(m2)=='undefined') m2 = '"'; if(typeof(m4)=='undefined') m4 = '"'; if(typeof(m5)=='undefined') m5 = ''; }
|
||||
var val = jQuery.trim(m3);
|
||||
if(uriReg.test(val)) val = val.replace(uriReg,'');
|
||||
else val = m3;
|
||||
return m1+m2+val+m4+m5;
|
||||
});
|
||||
return content;
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue