Html Encode String Javascript Functions With Parameters In Python