I think that the regex is wrong since now it won't work if you put two video tags on the same line.
In other words, most probably the current module fails to convert to video if two video tags are on the same line.
This fix will enable you to put various [video: ] tags on a single line.
function video_filter_process($text, $format = -1) {
if (preg_match_all('/\[video(\:(.+))?( .+)?\]/isU', $text, $matches_code)) {
foreach ($matches_code[0] as $ci => $code) {
Should be changed to
function video_filter_process($text, $format = -1) {
if (preg_match_all('/\[video(\:(.+?))?( .+?)?\]/isU', $text, $matches_code)) {
foreach ($matches_code[0] as $ci => $code) {
Adding +? would make a "lazy" match does enabling having multiple [video: ] tags on a single line.
Code tested on Regular expression arena but Untested on real module.
Please review.
Thanks!
Rod
Comments
Comment #1
blackdog commentedIn my tests it does work when having two tags on the same line. Can you please test on a real install?
Comment #2
blackdog commented