Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Here's a legitimate URL containing a semicolon: ">http://www.bso.org/singleTickets/perfDetail.jhtml;jsessionid=ZJQGML3ZKFTXNLA1AUHSFEQ?id=prod560093
and a fix that works for me:
diff -u -r1.9 urlfilter.module
--- urlfilter.module 7 Feb 2004 14:09:17 -0000 1.9
+++ urlfilter.module 9 Apr 2004 01:41:16 -0000
@@ -16,7 +16,7 @@
return form_group(t("URL Filter"), t("URL Filter is enabled. This means that web and email addresses will automatically be converted into (clickable) links."));
case "process":
$text = " " . $text . " ";
- $text = eregi_replace("([ \n\r\t])((http://|https://|ftp://|mailto:)([a-zA-Z0-9@:%_~#?&=.,/-]*[a-zA-Z0-9@:%_~#?&=/-]))([.,]?)([ \n\r\t])", '\1<a href="/">\2</a>\5\6', $text);
+ $text = eregi_replace("([ \n\r\t])((http://|https://|ftp://|mailto:)([a-zA-Z0-9@:;%_~#?&=.,/-]*[a-zA-Z0-9@:%_~#?&=/-]))([.,]?)([ \n\r\t])", '\1<a href="/">\2</a>\5\6', $text);
$text = eregi_replace("([ \n\r\t])([A-Za-z0-9._]+@[A-Za-z0-9._]+\.[A-Za-z]{2,4})([.,]?)([ \n\r\t])", '\1<a href="mailto:\2">\2</a>\3\4', $text);
$text = eregi_replace("([ \n\r\t])(www\.[a-zA-Z0-9@:%_~#?&=.,/-]*[a-zA-Z0-9@:%_~#\?&=/-])([.,]?)([ \n\r\t])", '\1<a href="http://\2">\2</a>\3\4', $text);
$text = substr($text, 1, -1);
***** CVS exited normally with code 1 *****
Comments
Comment #1
mikeryanHmmm, that URL worked fine in preview but not after submitting - obviously, remove the "<br />" at the end to get to the real page...
Comment #2
deekayen CreditAttribution: deekayen commentedI see a semicolon already in CVS's regexp.