Modified script, avoid removing img tags