def string_to_numeric_char_reference(string):
out = "<STR_LIT>"<EOL>for char in string:<EOL><INDENT>out += "<STR_LIT>" + str(ord(char)) + "<STR_LIT:;>"<EOL><DEDENT>return out<EOL>
Encode a string to HTML-compatible numeric character reference.
Eg: encode_html_entities("abc") == '&#97;&#98;&#99;'