4
I know this solution isn't ideal, but something is better than nothing. The '@', the '.' and the 'mailto:' get encoded. It should apply to all modules as well.
I'd appreciate comments on this - just learning PHP as I go. Ideally I'll only execute this if it's a mailto: link.
Edit the end of the &xoopsCodeDecode function in class/module.textsanitizer.php
$output = preg_replace($patterns, $replacements, $text);
$output = str_replace('@', '&X64;', $output);
$output = str_replace('.', '&X46;', $output);
$output = str_replace('mailto:', '&X109;&X97;&X105;&X108;&X116;&X111;&X58;', $output);
return $output;
//return preg_replace($patterns, $replacements, $text);
In this example, you get the following for
user@host.com:
<a href="&X109;&X97;&X105;&X108;&X116;&X111;&X58;user&X64;host&X46;com">user&X64 ;host&X46 ;coma>
Replace &X with to get the right results.