You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@labs.apache.org by si...@apache.org on 2009/04/15 14:45:08 UTC
svn commit: r765165 -
/labs/magma/trunk/website-dojo-textareas-youtubevideo/src/main/resources/dojo-1.2.0/dijit/_editor/plugins/YoutubeVideoDialog.js
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