commit 490794dfb9875eceaddea648919fa5cd54ebf23b
parent f17e0d6d288a86e7525cb6b051e3872651f7f176
Author: Dan Stillman <dstillman@zotero.org>
Date: Sat, 9 Oct 2010 19:22:28 +0000
More XPI fixes for TinyMCE
Diffstat:
1 file changed, 11 insertions(+), 6 deletions(-)
diff --git a/chrome/content/zotero/tinymce/tiny_mce.js b/chrome/content/zotero/tinymce/tiny_mce.js
@@ -537,21 +537,26 @@ tinymce.create('tinymce.util.Dispatcher', {
return;
}
+ // Added by Dan S./Zotero
+ u = u.replace("jar:file", "jarfile");
+ u = u.replace("zotero@chnm.gmu.edu", "zotero.chnm.gmu.edu");
+
// Absolute path with no host, fake host and protocol
if (u.indexOf('/') === 0 && u.indexOf('//') !== 0)
u = (s.base_uri ? s.base_uri.protocol || 'http' : 'http') + '://mce_host' + u;
// Relative path http:// or protocol relative //path
if (!/^\w*:?\/\//.test(u))
- u = (s.base_uri.protocol || 'http') + '://mce_host' + t.toAbsPath(s.base_uri.path, u);
+ // Modified by Dan S./Zotero
+ //u = (s.base_uri.protocol || 'http') + '://mce_host' + t.toAbsPath(s.base_uri.path, u);
+ u = s.base_uri.protocol + '://' + s.base_uri.path + '/' + u;
+
+ // Added by Dan S./Zotero
+ u = u.replace("jar:file", "jarfile");
+ u = u.replace("zotero@chnm.gmu.edu", "zotero.chnm.gmu.edu");
// Parse URL (Credits goes to Steave, http://blog.stevenlevithan.com/archives/parseuri)
u = u.replace(/@@/g, '(mce_at)'); // Zope 3 workaround, they use @@something
-
- // Added by Dan S./Zotero
- u = u.replace("jar:file", "jarfile");
- u = u.replace("zotero@chnm.gmu.edu", "zotero.chnm.gmu.edu");
-
u = /^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*):?([^:@]*))?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/.exec(u);
each(["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"], function(v, i) {
var s = u[i];