??γ?????????Bug??
???????????? ???????[ 2016/5/30 15:38:23 ] ?????????????????? ??????
????Noah Sussman ????д???????? ??????ò???????????????????嵥??????嵥???????????????а?????????????????????????????????????????
??????????????????????????????????????????????????д??????????????????з????????????
???????????????????????????????????“?????”?????????????????????Щ?????? bug??
???????????Ч?????????Easy Programming????????“???????????????? bug”??????????′??????????????
???????????????????????????????? bug?????????????????“?e????????????????????? bug ???б?????”????????????“????????????????????????? bug ???????????”
????????????????г????Щ???????в????
??????????? bug?????? SQL ?????? XSS ?????? Django ????????????? SQL ???? XSS ????д????????????? Django ?????????? bug ????????????????????? SQL ???????? HTML ?? API ?????????????????????????????????????????????κ?????? bug??
????????????????????????ú?в??????????????? bug ?????????????? XSS ????????м??ζ??е??????Щ???????? XSS ?????????????? HTML ????
????????????? Python ???????????????????????????????????????????????????д?????????????????????д????? HTML ???????
???????????????????????????????“???”??“??????????????????д HTML”?????????“?????? API ???????????????????????????”???????????????????????????????μ? API?????????Щ??????????????????
????????????????Щ????????????д???Щ??????????????????????????????????????????:
????Python
????from django.core.urlresolvers import reverse
????from django.template import Library
????from django.utils.html import escape
????from django.utils.safestring import mark_safe
????register = Library()
????@register.filter
????def account_link(account):
????return mark_safe(u'<a href="%s" title="%s %s">%s</a>' % (
????escape(reverse('account_stats'?? args=(account.username??)))??
????escape(account.first_name)??
????escape(account.last_name)??
????escape(account.username)??
????))
????from django.core.urlresolvers import reverse
????from django.template import Library
????from django.utils.html import escape
????from django.utils.safestring import mark_safe
????register = Library()
????@register.filter
????def account_link(account):
????return mark_safe(u'<a href="%s" title="%s %s">%s</a>' % (
????escape(reverse('account_stats'?? args=(account.username??)))??
????escape(account.first_name)??
????escape(account.last_name)??
????escape(account.username)??
????))
??????????????????????????ü?????????????????塣?????д??????? Django ????? API ?????????????????????????????????д??
????Python
????from django.core.urlresolvers import reverse
????from django.template import Library
????from somewhere import html_fragment
????register = Library()
????@register.filter
????def account_link(account):
????return html_fragment(u'<a href="%s" title="%s %s">%s</a>'??
????reverse('account_stats'?? args=(account.username??))??
????account.first_name??
????account.last_name??
????account.username??
????)
????from django.core.urlresolvers import reverse
????from django.template import Library
????from somewhere import html_fragment
????register = Library()
????@register.filter
????def account_link(account):
????return html_fragment(u'<a href="%s" title="%s %s">%s</a>'??
????reverse('account_stats'?? args=(account.username??))??
????account.first_name??
????account.last_name??
????account.username??
????)
???????д??? API??html_fragment?? ????д???????
????Python
????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)))
????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 ?б??У??????????????????????????????????????????????????????Щ?????????/???????/????
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11