이미지의 절대경로(http://~)를 XE 상대경로로 바꾸는 코드 수정

git-svn-id: http://xe-core.googlecode.com/svn/sandbox@7294 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
taggon 2010-02-08 07:40:29 +00:00
parent 01b7111378
commit cc2fa97e38

View file

@ -249,18 +249,18 @@ xe.XE_GET_WYSYWYG_CONTENT = jQuery.Class({
name : "XE_GET_WYSYWYG_CONTENT",
$ON_MSG_APP_READY : function() {
this.oApp.addConverter("IR_TO_WYSIWYG", this.TO_WYSIWYG_SET);
this.oApp.addConverter("IR_TO_HTMLSrc", this.IR_TO_HTMLSrc);
this.oApp.addConverter("IR_TO_WYSIWYG", this.replaceXE2HTTP);
this.oApp.addConverter("WYSIWYG_TO_IR", this.replaceHTTP2XE);
},
TO_WYSIWYG_SET : function(content) {
replaceXE2HTTP : function(content) {
// src, href, url의 XE 상대경로를 http로 시작하는 full path로 변경
content = editorReplacePath(content);
return content;
},
IR_TO_HTMLSrc : function(content) {
replaceHTTP2XE : function(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');