If you attempt to use textile to format a URL which contains a query string, then DrupalTextile will convert the URI contents into html entities.

E.g.

$text = <<<EOT
"blahblah":/filemanager/active?fid=21
EOT;

$textile = new DrupalTextile();
$html = $textile->process($text);
print $html;

This will produce:

<a href="%2Ffilemanager%2Factive%3Ffid%3D21">blahblah</a>

...which won't work in any browser i've tried.

The attached patch fixes this problem by stripping the query string from the URL and then passing this string into the Drupal url() function separately. This patch is against 4.7.x-1.x from nov 13.

CommentFileSizeAuthor
#1 drupaltextile2.patch.txt659 byteszonker
drupaltextile.patch.txt657 byteszonker

Comments

zonker’s picture

StatusFileSize
new659 bytes

Oops, mistake in patch. The first line of the function should read:

$query = null;

Updated patch attached.

trevortwining’s picture

Status: Active » Closed (fixed)

Not supporting 4.7 version AFAIK