MantisBT - ATutor
View Issue Details
0003166ATutorContentpublic2007-08-24 13:242008-08-21 08:57
greg 
greg 
normalminoralways
closedfixed 
 
1.6.1 
SVN
0003166: media tag displays in announcement
Embedded a media tag with a YouTube URL into an announcement, and the media tags display before and after the YouTube movie when displayed.
No tags attached.
Issue History
2007-08-24 13:24gregNew Issue
2007-08-24 13:24gregAffects version => SVN
2007-08-24 13:32gregNote Added: 0002559
2007-08-24 13:37gregNote Edited: 0002559
2007-08-26 22:01IndieRectNote Added: 0002560
2007-08-27 06:17user2Statusnew => resolved
2007-08-27 06:17user2Resolutionopen => no change required
2007-08-27 06:17user2Assigned To => user2
2008-02-11 06:12gregNote Added: 0002796
2008-02-11 06:12gregAssigned Touser2 =>
2008-02-11 06:12gregStatusresolved => new
2008-02-11 06:18gregNote Edited: 0002796
2008-02-11 06:32gregStatusnew => resolved
2008-02-11 06:32gregFixed in Version => 1.6.1
2008-02-11 06:32gregResolutionno change required => fixed
2008-02-11 06:32gregAssigned To => greg
2008-02-11 06:32gregNote Added: 0002797
2008-08-21 08:57gregStatusresolved => closed

Notes
(0002559)
greg   
2007-08-24 13:32   
(edited on: 2007-08-24 13:37)
also happens else where for YouTube, content, forums

(0002560)
IndieRect   
2007-08-26 22:01   
The reason is that a regexp in the parsing routine matches only the URL itself, w/o tags. So YouTube links would be converted into videos even without [media] tags.
(0002796)
greg   
2008-02-11 06:12   
(edited on: 2008-02-11 06:18)
media tag is still appearing with YouTube movies.

update with
    
$text = preg_replace("#\[media\]http://(www.)?youtube.com/watch\?v=([a-z0-9_-]+)\[/media\]#i", [^] '<object width="425" height="350"><param name="movie" value="http://www.youtube.com/v/\\2"></param><embed [^] src="http://www.youtube.com/v/\\2" [^] type="application/x-shockwave-flash" width="425" height="350"></embed></object>', $text);

(0002797)
greg   
2008-02-11 06:32   
Committed revision 7283.