???????д??? API??html_fragment?? ????д???????

from django.utils.html import escape
from django.utils.safestring import mark_safe?? conditional_escape
def html_fragment(template?? *args):
return mark_safe(template % tuple(map(conditional_escape?? args)))

 

 ?????????? django-devs ???????????????????????????????????? Django 1.5 ???????’django.utils.html.format_html’ ?????????????Щ????
?????????????????????????????????д?????????????????????????(???????????? html_fragment ???????????)???????????????????????——????С?? html ????? html_fragment?? ??????? Django ????? API?????????????????
????????????????????????????п???????????? SQL ?????? XSS ????????????????????????????????????顣?????????????? API ??÷?????λ??
?????????????? -“?????????? null ?? NaN?? ???????????????????????????????????????”??????????????????????ε??磬????????????????????????????????????????????????????????????????????????????????????????????????????????洦?????????????“???????????????”
????????????????t???????????????????????????2??????У?????????????????????
??????????? bug???? Noah ?????????г?????????????????? bug ???????????????????Щ?????????????????????“???????????????????????????????????????????”
?????????????????“?????????Щ?????????????????”
??????????????????????????????????????????????????????磬Python ?? decimal ????????????????????????????????????е??????????????????п???? bug ??????
??????λ??????????и??????????? bug ????????????“???????????????????????????????????Щ bug ???”
????????????????в?????????????????????????λ?????????????й?????? Haskell ?к?????????“3??”???????“2??” ??????????????????????????????
???????? Python?????? magnitude ?? units ?????????????????е??????????????
???????????????????????????Щ???????????????Щ????????????????????????????????????????????????????????????λ???????
????????ó????????????????????λ????????????????????????????ж??????Щ????????????????????????????????? API ??????????????????????????????
???????????????????????????????м???????????????飬??????????????????????????????????????????д?????????????????????????д???????????????????????????????????????????Щ?????????
????????——???? unicode ??????? ASCII ?????в??????????????????????????????????—— ???κε?????? unicode ——??????????? bug??
????Python 2.x ????????????????——?????????? unicode ???????????????????????????в?????????????? bug??
?????????????????д????????——???????????????——??????????????????????? Python3 ?б???????
???????????????????? Noah ???б??????????????е???????????????????????????????????????????????????? :-)????????????????????????? bug ???????????????????????????????????????????????
????????????????????????????б?????????Щ?????????——???綹??????????????????????????????????????????? bug????????????????????????????д??????????????????????д?????????????????????????????????? bug??
????????????????????????????????????Щ bug д?????????????????????? bug ?????????????????????????????????????????????? bug ???Σ????????????д??????????????????????д?????????????????????Σ????????????н????????????
?????????? bug ????????????? bug ?б??У??????????????????????????????????????????????????????Щ?????????/???????/????