Repair mistakenly self-closing script tag generation