There are some strange encodings inside function _freelinking_do_filtering().
I don't know what for they are, but it seams that the extra character encoding breaks text when used later for "wikitools".
Quick-and-easy fix below.
Change:
if (preg_match('/^(http|mailto|https|ftp):/', $freelink)) {
$replacement = '<a class="freelinking external" href="' . $freelink . '">' . $phrase . '</a>';
}
else {
$replacement = l($phrase, 'freelinking/' . rawurlencode($freelink), array('class' => 'freelinking'));
}
to:
if (preg_match('/^(http|mailto|https|ftp):/', $freelink)) {
$replacement = l($phrase, $freelink, array('class' => 'freelinking external'));
}
else {
$replacement = l($phrase, 'freelinking/'.$freelink, array('class' => 'freelinking'));
}
and also:
else if ($allowcamelcase) { // it's a CamelCase, expressions are a bit simpler
$pattern = '/\b' . $wikiword . '\b(?![^<]*>)/';
$phrase = $wikiword; // consistency for the db
$freelink = $wikiword; // also for the db
$replacement = l($wikiword, 'freelinking/' . urlencode($wikiword));
}
to:
else if ($allowcamelcase) { // it's a CamelCase, expressions are a bit simpler
$pattern = '/\b' . $wikiword . '\b(?![^<]*>)/';
$phrase = $wikiword; // consistency for the db
$freelink = $wikiword; // also for the db
$replacement = l($wikiword, 'freelinking/' . $wikiword, array('class' => 'freelinking'));
}
Comments
Comment #1
eafarris commentedThis should be fixed as the result of switching the regular expressions to UTF aware.
Fixed in freelinking-6.x-1.7. Please verify and close.