Skip to content

Commit 9ffe1e4

Browse files
committed
Reverted unintentional commit
- Legacy-Id: 14709
1 parent a5db4d0 commit 9ffe1e4

4 files changed

Lines changed: 10 additions & 56 deletions

File tree

ietf/settings.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -613,6 +613,9 @@ def skip_unreadable_post(record):
613613
'default': {
614614
'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
615615
'LOCATION': '127.0.0.1:11211',
616+
'OPTIONS': {
617+
'MAX_ENTRIES': 10000, # 10,000
618+
},
616619
},
617620
'htmlized': {
618621
'BACKEND': 'django.core.cache.backends.filebased.FileBasedCache',

ietf/templates/doc/document_bibtex.bib

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
{% spaceless %}
2-
{% autoescape off %}
2+
33
{% load ietf_filters %}
4-
{% load textfilters %}
54
65
{% if doc.get_state_slug == "rfc" %}
76
{% if doc.stream|slugify == "legacy" %}
@@ -25,14 +24,13 @@ @techreport{
2524
publisher = {% templatetag openbrace %}Internet Engineering Task Force{% templatetag closebrace %},
2625
note = {% templatetag openbrace %}Work in Progress{% templatetag closebrace %},
2726
url = {% templatetag openbrace %}https://datatracker.ietf.org/doc/html/{{doc.name}}-{{doc.rev}}{% templatetag closebrace %},{% endif %}
28-
author = {% templatetag openbrace %}{% for author in doc.documentauthor_set.all %}{{ author.person.name|texescape}}{% if not forloop.last %} and {% endif %}{% endfor %}{% templatetag closebrace %},
29-
title = {% templatetag openbrace %}{% templatetag openbrace %}{{doc.title|texescape}}{% templatetag closebrace %}{% templatetag closebrace %},
27+
author = {% templatetag openbrace %}{% for author in doc.documentauthor_set.all %}{{ author.person.name}}{% if not forloop.last %} and {% endif %}{% endfor %}{% templatetag closebrace %},
28+
title = {% templatetag openbrace %}{% templatetag openbrace %}{{doc.title}}{% templatetag closebrace %}{% templatetag closebrace %},
3029
pagetotal = {{ doc.pages }},
3130
year = {{ doc.pub_date.year }},
3231
month = {{ doc.pub_date|date:"b" }},{% if not doc.rfc_number or doc.pub_date.day == 1 and doc.pub_date.month == 4 %}
3332
day = {{ doc.pub_date.day }},{% endif %}
34-
abstract = {% templatetag openbrace %}{{ doc.abstract|clean_whitespace|texescape }}{% templatetag closebrace %},
33+
abstract = {% templatetag openbrace %}{{ doc.abstract|clean_whitespace }}{% templatetag closebrace %},
3534
{% templatetag closebrace %}
3635
37-
{% endautoescape %}
3836
{% endspaceless %}
Lines changed: 3 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
from __future__ import unicode_literals
22

3-
from django import template
3+
from django.template.library import Library
44
from django.template.defaultfilters import stringfilter
55

6-
import debug # pyflakes:ignore
6+
from ietf.utils.text import xslugify as _xslugify
77

8-
from ietf.utils.text import xslugify as _xslugify, texescape
9-
10-
register = template.Library()
8+
register = Library()
119

1210
@register.filter(is_safe=True)
1311
@stringfilter
@@ -28,40 +26,3 @@ def format(format, values):
2826
tmp[f.name] = getattr(values, f.name)
2927
values = tmp
3028
return format.format(**values)
31-
32-
# ----------------------------------------------------------------------
33-
34-
# from django.utils.safestring import mark_safe
35-
# class TeXEscapeNode(template.Node):
36-
# """TeX escaping, rather than html escaping.
37-
#
38-
# Mostly, this tag is _not_ the right thing to use in a template that produces TeX
39-
# markup, as it will escape all the markup characters, which is not what you want.
40-
# Use the '|texescape' filter instead on text fragments where escaping is needed
41-
# """
42-
# def __init__(self, nodelist):
43-
# self.nodelist = nodelist
44-
#
45-
# def render(self, context):
46-
# saved_autoescape = context.autoescape
47-
# context.autoescape = False
48-
# text = self.nodelist.render(context)
49-
# text = texescape(text)
50-
# context.autoescape = saved_autoescape
51-
# return mark_safe(text)
52-
#
53-
# @register.tag('texescape')
54-
# def do_texescape(parser, token):
55-
# args = token.contents.split()
56-
# if len(args) != 1:
57-
# raise TemplateSyntaxError("'texescape' tag takes no arguments.")
58-
# nodelist = parser.parse(('endtexescape',))
59-
# parser.delete_first_token()
60-
# return TeXEscapeNode(nodelist)
61-
62-
@register.filter('texescape')
63-
@stringfilter
64-
def texescape_filter(value):
65-
"A TeX escape filter"
66-
return texescape(value)
67-

ietf/utils/text.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111

1212
import debug # pyflakes:ignore
1313

14-
from texescape import init as texescape_init, tex_escape_map
15-
1614
@keep_lazy(six.text_type)
1715
def xslugify(value):
1816
"""
@@ -176,9 +174,3 @@ def dict_to_text(d):
176174
for k, v in d.items():
177175
t += "%s: %s\n" % (k, v)
178176
return t
179-
180-
def texescape(s):
181-
if not tex_escape_map:
182-
texescape_init()
183-
t = s.translate(tex_escape_map)
184-
return t

0 commit comments

Comments
 (0)