diff --git a/ietf/idtracker/templatetags/ietf_filters.py b/ietf/idtracker/templatetags/ietf_filters.py index 0acbaaeb3..cacc22539 100644 --- a/ietf/idtracker/templatetags/ietf_filters.py +++ b/ietf/idtracker/templatetags/ietf_filters.py @@ -105,7 +105,7 @@ def square_brackets(value): @register.filter(name='fill') def fill(text, width): - """Wraps the single paragraph in text (a string) so every line + """Wraps each paragraph in text (a string) so every line is at most width characters long, and returns a single string containing the wrapped paragraph. """ @@ -125,3 +125,17 @@ def fill(text, width): def allononeline(text): """Simply removes CRs, LFs, leading and trailing whitespace from the given string.""" return text.replace("\r", "").replace("\n", "").strip() + +@register.filter(name='rfcspace') +def rfcspace(string): + """ + If the string is an RFC designation, and doesn't have + a space between 'RFC' and the rfc-number, a space is + added + """ + string = str(string) + if string[:3].lower() == "rfc" and string[3] != " ": + return string[:3] + " " + string[3:] + else: + return string + diff --git a/ietf/ipr/testurl.list b/ietf/ipr/testurl.list index d3d706bcc..1ca9b7507 100644 --- a/ietf/ipr/testurl.list +++ b/ietf/ipr/testurl.list @@ -1,3 +1,4 @@ +# -*- conf-mode -*- 200 /ipr/ https://datatracker.ietf.org/public/ipr_list.cgi 200 /ipr/ipr-657/ https://datatracker.ietf.org/public/ipr_detail_show.cgi?&ipr_id=657 # Generic disclosure 200 /ipr/ipr-834/ https://datatracker.ietf.org/public/ipr_detail_show.cgi?&ipr_id=834 # Specific disclosure @@ -7,4 +8,6 @@ 200 /ipr/new-specific/ https://datatracker.ietf.org/public/ipr_notify.cgi 200 /ipr/update/ https://datatracker.ietf.org/public/ipr_update_list.cgi 200 /ipr/search/ https://datatracker.ietf.org/public/ipr_search.cgi -# /ipr/update \ No newline at end of file +302 /ipr/search/?option=document_search # incomplete argument set gives redirect +200 /ipr/search/?option=document_search&document_search=mod https://datatracker.ietf.org/public/ipr_search.cgi?option=document_search&document_search=mod +200 /ipr/search/?option=document_search&id_document_tag=2220 https://datatracker.ietf.org/public/ipr_search.cgi?option=document_search&id_document_tag=2220 diff --git a/ietf/ipr/urls.py b/ietf/ipr/urls.py index 7496e1afc..b18eddc61 100644 --- a/ietf/ipr/urls.py +++ b/ietf/ipr/urls.py @@ -9,7 +9,6 @@ urlpatterns = patterns('', (r'^update/(?P\d+)/$', views.update), (r'^new-(?P(specific|generic|third-party))/$', views.new), (r'^search/$', views.search), - (r'^search/\?((option=(?P