labs-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simo...@apache.org
Subject svn commit: r765165 - /labs/magma/trunk/website-dojo-textareas-youtubevideo/src/main/resources/dojo-1.2.0/dijit/_editor/plugins/YoutubeVideoDialog.js
Date Wed, 15 Apr 2009 12:45:08 GMT
Author: simoneg
Date: Wed Apr 15 12:45:08 2009
New Revision: 765165

URL: http://svn.apache.org/viewvc?rev=765165&view=rev
Log:
LABS-346 : modified regex for youtube video inclusion

Modified:
    labs/magma/trunk/website-dojo-textareas-youtubevideo/src/main/resources/dojo-1.2.0/dijit/_editor/plugins/YoutubeVideoDialog.js

Modified: labs/magma/trunk/website-dojo-textareas-youtubevideo/src/main/resources/dojo-1.2.0/dijit/_editor/plugins/YoutubeVideoDialog.js
URL: http://svn.apache.org/viewvc/labs/magma/trunk/website-dojo-textareas-youtubevideo/src/main/resources/dojo-1.2.0/dijit/_editor/plugins/YoutubeVideoDialog.js?rev=765165&r1=765164&r2=765165&view=diff
==============================================================================
--- labs/magma/trunk/website-dojo-textareas-youtubevideo/src/main/resources/dojo-1.2.0/dijit/_editor/plugins/YoutubeVideoDialog.js
(original)
+++ labs/magma/trunk/website-dojo-textareas-youtubevideo/src/main/resources/dojo-1.2.0/dijit/_editor/plugins/YoutubeVideoDialog.js
Wed Apr 15 12:45:08 2009
@@ -33,7 +33,7 @@
 		buttonClass: dijit.form.DropDownButton,
 		iconClassPrefix: "dijitEditorIcon",
 		useDefaultCommand: false,
-		urlRegExp: "http\\://www.youtube.com/watch\\?v\\=([0-9a-zA-Z]*)",
+		urlRegExp: "http\\://www.youtube.com/watch\\?v\\=([0-9a-zA-Z\\_\\-]*)",
 		objTemplate: "<object width='425' height='344'><param name='movie' " + 
 		  "value='http://www.youtube.com/v/${videoid}&fs=1'></param>" +
 		  "<param name='allowFullScreen' value='true'></param>"+
@@ -128,7 +128,7 @@
 				
 		replaceWithRealVideos: function(html){
 			var objTemplate = this.objTemplate;
-			return html.replace(/\<img[^>]*dojoyoutube\=["']([a-zA-Z0-9]*)['"][^>]*\>/g,
function(match, videoid) {
+			return html.replace(/\<img[^>]*dojoyoutube\=["']([a-zA-Z0-9\-\_]*)['"][^>]*\>/g,
function(match, videoid) {
 					return dojo.string.substitute(objTemplate, {videoid: videoid});
 			});
 		},



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@labs.apache.org
For additional commands, e-mail: commits-help@labs.apache.org


Mime
View raw message