Removes the script tag from the gallery