If the youtube/google url is wrapped in tags, as is the case with a href the regex should probably not run, so I added this as a bug, but it could be a feature request:
By making the regex dependent on a space \s before the url this should just leave it as a plain href link, without swapping in the embed/object code.
Ex. with \s added to the beginning of the search pattern:
preg_replace_callback('!\s(((http://)?)|(^./))(((www.)?)|(^./))youtube\.com/watch[?]v=([^\[\]()<.,\s\n\t\r]+)!i', 'googtube_youtube', $text);
Note. This should work as long as there is not a sloppy href with a space in it, like " http://", in which case my knowledge of regex's is limited, so I don't know what to suggest.
Comments
Comment #1
alexiscott commentedSorry, typo in the description, typed tags but meant quotes.
Comment #2
alexandreracine commentedCould you create a patch and test it? If it works, I would test it too and commit. Thanks.
Comment #3
alexandreracine commentedReopen if someone has a patch.
Comment #4
Dmoz commentedSounds good to me. Typically you would leave the url alone in this case.
For Medical Equipment or Medical Supplies, visit QuickMedical.
Comment #5
edwardpan1 commentedcreate a patch and test it