Fix #275, Encoding URL for preview