Fix JS error if the title contains single quote