Hello:
Since I had been using Drupal for all of a couple days before I wrote this, I'm hoping that someone can tell me whether I'm using check_url properly (or need to use another function). Yes, I've read the docs, searched the forums, and it looks good. But, I'd still feel better if someone gave me a thumbs up before deploying it (or telling me what's wrong).
Since DruTex doesn't have mimeTex support yet (my provider doesn't have a LaTeX installation nor will they), I needed to write a simple filter so I can write math. At any rate, here's the code. It works, but I'm just wondering about check_url (i.e. security).
function mtex_filter($op, $delta = 0, $format = -1, $text = '') {
switch ($op) {
case 'list':
return array(0 => t('mTex'));
case 'description':
return t("A simple module for rendering LaTeX equations using mimeTex");
case 'prepare':
$text = preg_replace("/(.+)<\/tex>/", "\xFEtex\xFF$1\xFE/tex\xFF", $text);
return t($text);
case 'process':
$text = preg_replace("/\xFEtex\xFF(.+)\xFE\/tex\xFF/", "
", $text);
return t($text);
default: