[pLog-svn] r7026 - in plog/branches/lifetype-1.2/js/tinymce/plugins: insertresource insertvideo more
jondaley at devel.lifetype.net
jondaley at devel.lifetype.net
Tue Sep 21 17:29:55 EDT 2010
Author: jondaley
Date: 2010-09-21 17:29:55 -0400 (Tue, 21 Sep 2010)
New Revision: 7026
Modified:
plog/branches/lifetype-1.2/js/tinymce/plugins/insertresource/editor_plugin.js
plog/branches/lifetype-1.2/js/tinymce/plugins/insertvideo/editor_plugin.js
plog/branches/lifetype-1.2/js/tinymce/plugins/more/editor_plugin.js
Log:
need to check if the array exists before accessing its members (only happens if you have a tag like <img /> but we should still be able to view the HTML source
Modified: plog/branches/lifetype-1.2/js/tinymce/plugins/insertresource/editor_plugin.js
===================================================================
--- plog/branches/lifetype-1.2/js/tinymce/plugins/insertresource/editor_plugin.js 2010-09-08 14:49:35 UTC (rev 7025)
+++ plog/branches/lifetype-1.2/js/tinymce/plugins/insertresource/editor_plugin.js 2010-09-21 21:29:55 UTC (rev 7026)
@@ -140,7 +140,7 @@
attribs = TinyMCE_insertresourcePlugin._parseAttributes( objectTag );
var cssClass = "";
- if( attribs["value"] == undefined || attribs["class"] != "ltPlayer" ) {
+ if( !attribs || attribs["value"] == undefined || attribs["class"] != "ltPlayer" ) {
startPos++;
continue;
}
@@ -183,7 +183,7 @@
var attribs = TinyMCE_insertresourcePlugin._parseAttributes(content.substring(startPos + 4, endPos));
// If not flash, skip it
- if (attribs['class'] != "ltFlashPlayer" )
+ if (!attribs || attribs['class'] != "ltFlashPlayer" )
continue;
type = attribs['class'];
Modified: plog/branches/lifetype-1.2/js/tinymce/plugins/insertvideo/editor_plugin.js
===================================================================
--- plog/branches/lifetype-1.2/js/tinymce/plugins/insertvideo/editor_plugin.js 2010-09-08 14:49:35 UTC (rev 7025)
+++ plog/branches/lifetype-1.2/js/tinymce/plugins/insertvideo/editor_plugin.js 2010-09-21 21:29:55 UTC (rev 7026)
@@ -115,7 +115,7 @@
attribs = TinyMCE_insertvideoPlugin._parseAttributes( objectTag );
var cssClass = "";
- if( attribs["data"] == undefined ) {
+ if( !attribs || attribs["data"] == undefined ) {
startPos++;
continue;
}
@@ -176,7 +176,7 @@
var attribs = TinyMCE_insertvideoPlugin._parseAttributes(content.substring(startPos + 4, endPos));
// Is not flash, skip it
- if (attribs['class'] != "ltVideoYouTube" && attribs['class'] != "ltVideoGoogleVideo" && attribs['class'] != "ltVideoMetacafe" && attribs['class'] != "ltVideoIfilm" && attribs['class'] != "ltVideoGoear" && attribs['class'] != "ltVideoGrouper" && attribs['class'] != "ltVideoDailymot" && attribs['class'] != "ltVideoVimeo")
+ if (!attribs || attribs['class'] != "ltVideoYouTube" && attribs['class'] != "ltVideoGoogleVideo" && attribs['class'] != "ltVideoMetacafe" && attribs['class'] != "ltVideoIfilm" && attribs['class'] != "ltVideoGoear" && attribs['class'] != "ltVideoGrouper" && attribs['class'] != "ltVideoDailymot" && attribs['class'] != "ltVideoVimeo")
continue;
type = attribs['class'];
Modified: plog/branches/lifetype-1.2/js/tinymce/plugins/more/editor_plugin.js
===================================================================
--- plog/branches/lifetype-1.2/js/tinymce/plugins/more/editor_plugin.js 2010-09-08 14:49:35 UTC (rev 7025)
+++ plog/branches/lifetype-1.2/js/tinymce/plugins/more/editor_plugin.js 2010-09-21 21:29:55 UTC (rev 7026)
@@ -166,7 +166,7 @@
var attribs = this._parseAttributes(
content.substring(startPos + 4, endPos));
- if (attribs['class'] == "mce_plugin_more_more") {
+ if (attribs && attribs['class'] == "mce_plugin_more_more") {
endPos += 2;
// Insert embed/object chunk
More information about the pLog-svn
mailing list