Hapless band of staff and regulars

Sunday 22nd January 2006

Alt attributes on LibDem Blogs

Just an update to the LibDem Blog code.
I’ve added this line of code

$text = preg_replace(’/<img.*?alt=(”|\’)(.*?)\1.*?>/i’, ‘ {$2} ‘, $text);

Which replaces <img xsrc=”http://blog.artesea.co.uk/images/ming.png/” mce_src=”http://blog.artesea.co.uk/images/ming.png/” alt=”Ming T-Shirt” /> with {Ming T-Shirt}

GooSync

Leave a Reply