projects
/
embedvideo
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f7553a8
)
Added code to strip trailing whitespace off URL, which causes issues
author
Alan J. Pippin
<ajp@pippins.net>
Sun, 1 Feb 2009 20:58:06 +0000
(13:58 -0700)
committer
Alan J. Pippin
<ajp@pippins.net>
Sun, 1 Feb 2009 20:58:06 +0000
(13:58 -0700)
when actually embedding the video.
ItemAddEmbedVideo.inc
patch
|
blob
|
history
diff --git
a/ItemAddEmbedVideo.inc
b/ItemAddEmbedVideo.inc
index bfb8daab44028f339ca27a5d45fcf621bc1b8829..bbb941d3a6562f6d652a62af5ef336cd66f8f6a4 100644
(file)
--- a/
ItemAddEmbedVideo.inc
+++ b/
ItemAddEmbedVideo.inc
@@
-175,8
+175,12
@@
class ItemAddEmbedVideo extends ItemAddPlugin {
$unsupported_url=0;
/* Store the passed URL in a shorter local variable */
+ /* Strip trailing whitespace in the url, this will cause problems later */
$url = $form['webPage']['URL'];
-
+ if(preg_match("/(.*?)\s+/",$url,$matches)) {
+ $url = $matches[1];
+ }
+
/*
*****************************
* Embed a Youtube Video