internlm/SWE-Fixer-Train-110K huggingface dataset:
Repository: LMFDB/lmfdb

Issue:
Refine search box knowls open in weird places
On
https://www.lmfdb.org/ModularForm/GL2/Q/holomorphic/?hst=List&level=67&weight=2&search_type=List

clicking on bad p. or char causes a knowl to open that misformats the entire table of refine search boxes, this does not happen for  primitive character or Nk^2 so I believe it is the presence of a dropdown box next to the knowl that breaks it.


Discussion:
yup, it is inside of a div, hence doesn't try to open it in the next row of the table :(
Just removing the div and setting  `style="display: flex; justify-content: space-between;"` on the td instead seems to work and not require complicating the knowl javascript further.

Resolving patch:
diff --git a/lmfdb/utils/search_boxes.py b/lmfdb/utils/search_boxes.py
--- a/lmfdb/utils/search_boxes.py
+++ b/lmfdb/utils/search_boxes.py
@@ -385,12 +385,10 @@ def __init__(self, name, label, select_box, **kwds):
     def label_html(self, info=None):
         colspan = self.label_colspan if info is None else self.short_colspan
         return (
-            self.td(colspan, nowrap=True)
-            + '<div style="display: flex; justify-content: space-between;">'
+                self.td(colspan, nowrap=True, style="text-align-last: justify;")
             + self._label(info)
             + '<span style="margin-left: 10px;"></span>'
             + self.select_box._input(info)
-            + "</div>"
             + "</td>"
         )
 


Test patch:
Repository: LMFDB/lmfdb

Issue:
Download zeros links not working on L-function pages
We are getting zero errors in the flasklog on links like

https://www.lmfdb.org/L/download_zeros/EllipticCurve/2.2.21.1/21.1/b/

This is likely due to recent changes made to fix some other flasklog errors.  I will look at this today.


Discussion:

Resolving patch:
diff --git a/lmfdb/lfunctions/main.py b/lmfdb/lfunctions/main.py
--- a/lmfdb/lfunctions/main.py
+++ b/lmfdb/lfunctions/main.py
@@ -888,7 +888,7 @@ def download_zeros(args):
         assert L
     except:
         return abort(404)
-    return L.download_zeroes()
+    return L.download_zeros()
 
 @l_function_page.route("/download_dirichlet_coeff/<path:args>/")
 def download_dirichlet_coeff(args):


Test patch:
Repository: LMFDB/lmfdb

Issue:
Bad links on HMF browse pages
A report from the bug report system, from Paul Gunnells:  

"On 

https://www.lmfdb.org/ModularForm/GL2/TotallyReal/browse/2/ 

the links in the middle column (the Number of newforms column) are all the same and point to https://www.lmfdb.org/ModularForm/GL2/TotallyReal/?field_label=2.2.497.1 instead of urls the modular form data they're supposed to."


Discussion:

Resolving patch:
diff --git a/lmfdb/hilbert_modular_forms/hmf_stats.py b/lmfdb/hilbert_modular_forms/hmf_stats.py
--- a/lmfdb/hilbert_modular_forms/hmf_stats.py
+++ b/lmfdb/hilbert_modular_forms/hmf_stats.py
@@ -97,7 +97,7 @@ def statistics(self, d=None):
                      "counts": {F: {"nforms": counts[F],
                                     "maxnorm": nstats[F]["max"],
                                     "field_knowl": nf_display_knowl(F, F),
-                                    "forms": lambda : url_for('hmf.hilbert_modular_form_render_webpage', field_label=F)}
+                                    "forms": lambda label: url_for('hmf.hilbert_modular_form_render_webpage', field_label=label)}
                                 for F in C["fields_by_degree"][d]}}
                  for d in C["degrees"]}
         return stats


Test patch:
Repository: LMFDB/lmfdb

Issue:
Server error on bad j-invariant search input for ECNF
When searching for elliptic curves over number fields by j-invariant, entering a field and then an invalid j-invariant (e.g. "banana") results in a server error:

    https://www.lmfdb.org/EllipticCurve/?count=None&hst=List&field=2.2.5.1&jinv=banana&search_type=List

To reproduce go to https://www.lmfdb.org/EllipticCurve/ and enter "2.2.5.1" (or any valid field label) into the base field and "banana" into the j-invariant field.

EC/Q and G2C/Q both pass the banana test so this would appear to be specific to the search parsing/validation that is being done on the ECNF page (where the j-invariant is an algebraic number not just a rational number or list of rational numbers).


Discussion:
I have never liked this feature anyway, since we really don't have a good way for users to enter algebraic numbers.

While testing this I noticed that the (random example) page  https://www.lmfdb.org/EllipticCurve/2.2.5.1/2581.2/a/1 has malformed latex equation.  In this case it is because the generator \phi is concatenated with x, and this error is in the database entry so it is not a code problem.  I'll raise an issue and solve it.

Resolving patch:
diff --git a/lmfdb/ecnf/main.py b/lmfdb/ecnf/main.py
--- a/lmfdb/ecnf/main.py
+++ b/lmfdb/ecnf/main.py
@@ -105,7 +105,7 @@ def get_nf_info(lab):
     return label, pretty
 
 
-ecnf_credit = "John Cremona, Alyson Deines, Steve Donelly, Paul Gunnells, Warren Moore, Haluk Sengun, Andrew V Sutherland, John Voight, Dan Yasaki"
+ecnf_credit = "John Cremona, Alyson Deines, Steve Donelly, Paul Gunnells, Warren Moore, Haluk Sengun, Andrew Sutherland, John Voight, Dan Yasaki"
 
 
 def get_bread(*breads):
diff --git a/lmfdb/utils/search_parsing.py b/lmfdb/utils/search_parsing.py
--- a/lmfdb/utils/search_parsing.py
+++ b/lmfdb/utils/search_parsing.py
@@ -75,7 +75,7 @@ def __call__(self, info, query, field=None, name=None, qfield=None, *args, **kwd
                 self.f(inp, query, qfield, *args, **kwds)
             if self.clean_info:
                 info[field] = inp
-        except (ValueError, AttributeError, TypeError) as err:
+        except ValueError as err:
             if self.error_is_safe:
                 flash_error("<span style='color:black'>%s</span> is not a valid input for <span style='color:black'>%s</span>. "+str(err)+".", inp, name)
             else:
@@ -887,7 +887,10 @@ def pol_string_to_list(pol, deg=None, var=None):
         var = findvar(pol)
         if not var:
             var = 'a'
-    pol = PolynomialRing(QQ, var)(str(pol))
+    try:
+        pol = PolynomialRing(QQ, var)(str(pol))
+    except TypeError:
+        raise SearchParsingError("Input not recognized as a polynomial.")
     if deg is None:
         fill = 0
     else:


Test patch:
Repository: LMFDB/lmfdb

Issue:
Possible error in q-expansion of a CMF
From the feedback page:

On
  https://www.lmfdb.org/ModularForm/GL2/Q/holomorphic/35/10/a/b/

the newform 35.10.a.b, I think the q-expansion is correct for beta=sqrt2, not the given 2sqrt2 -- It disagrees with Magma, unless beta is sqrt2.







Discussion:
The embedded values are also consistent with beta=sqrt2.
Yes, it looks like the Q-expansion is written in terms of the power basis rather than [1,beta].  This looks like a data issue to me, not a bug in the code.  I'll look into it.
Actually this is not a data error, the data is correct, see https://www.lmfdb.org/api/mf_hecke_nf/?label=35.10.a.b.  The hecke_ring_bases is 1, 2*sqrt(2) and the coefficient of a_2 in this basis is written as [-12,1] which should be displaying as (-12+beta) not (-12+2beta).  And hecke_ring_power_basis is set to false.

I think this is a bug in the display code.  Possibly coming from it trying to do something clever for quadratic fields (if it had replaced beta with sqrt(2) it would be correct)?  @edgarcosta and @roed314 can one of you take a look at this?
I will look into this.

On Wed, Nov 25, 2020 at 11:30 AM Andrew Sutherland <notifications@github.com>
wrote:

> Actually this is not a data error, the data is correct, see
> https://www.lmfdb.org/api/mf_hecke_nf/?label=35.10.a.b. The
> hecke_ring_bases is 1, 2*sqrt(2) and the coefficient of a_2 in this basis
> is written as [-12,1] which should be displaying as (-12+beta) not
> (-12+2beta). And hecke_power_ring_basis is set to false.
>
> I think this is a bug in the display code. Possibly coming from it trying
> to do something clever for quadratic fields (if it had replaced beta with
> sqrt(2) it would be correct)? @edgarcosta <https://github.com/edgarcosta>
> and @roed314 <https://github.com/roed314> can one of you take a look at
> this?
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <https://github.com/LMFDB/lmfdb/issues/4247#issuecomment-733813671>, or
> unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AACO2BTGJYONCKYJXO5FO2DSRUWKXANCNFSM4UCSWMOQ>
> .
>


Resolving patch:
diff --git a/lmfdb/classical_modular_forms/web_newform.py b/lmfdb/classical_modular_forms/web_newform.py
--- a/lmfdb/classical_modular_forms/web_newform.py
+++ b/lmfdb/classical_modular_forms/web_newform.py
@@ -238,7 +238,7 @@ def __init__(self, data, space=None, all_m = False, all_n = False, embedding_lab
                 # This is not enough, for some reason
                 #if (m != 0) and (not self.single_generator):
                 # This is the only thing I could make work:
-                if (m != 0) and (self.hecke_ring_numerators is not None):
+                if (m != 0) and self.field_poly_is_cyclotomic and (self.hecke_ring_numerators is not None):
                     self.convert_qexp_to_cyclotomic(m)
                     self.show_hecke_ring_basis = False
                 else:


Test patch:
Repository: LMFDB/lmfdb

Issue:
Fix python 2->3 problem in verify



Discussion:
Aah, this change is also in my PR #4231 
in light fo that comment, I will close this PR

Resolving patch:
diff --git a/lmfdb/characters/TinyConrey.py b/lmfdb/characters/TinyConrey.py
--- a/lmfdb/characters/TinyConrey.py
+++ b/lmfdb/characters/TinyConrey.py
@@ -158,5 +158,5 @@ def sage_zeta_order(self, order):
     def sage_character(self, order, genvalues):
         H = DirichletGroup(self.modulus, base_ring=CyclotomicField(order))
         M = H._module
-        order_corrected_genvalues = get_sage_genvalues(self.modulus, order, genvalues, H.zeta_order())
+        order_corrected_genvalues = get_sage_genvalues(self.modulus, order, genvalues, self.sage_zeta_order(order))
         return DirichletCharacter(H,M(order_corrected_genvalues))


Test patch:
Repository: LMFDB/lmfdb

Issue:
Dirichlet character compute buttons not working on production
None of the compute buttons are working on https://www.lmfdb.org/Character/Dirichlet/3/2 or any of the Dirichlet character pages on the production site, but they all seem to work fine on beta (so this most likely is a configuration issue not anything in the characters code).  Even just typing "banana" in the value box and clicking compute gives no feedback (you get a "bad input" error message on beta).


Discussion:

Resolving patch:
diff --git a/lmfdb/app.py b/lmfdb/app.py
--- a/lmfdb/app.py
+++ b/lmfdb/app.py
@@ -680,6 +680,10 @@ def sitemap():
 WhiteListedRoutes = [
     'ArtinRepresentation',
     'Character/Dirichlet',
+    'Character/calc-gauss/Dirichlet',
+    'Character/calc-jacobi/Dirichlet',
+    'Character/calc-kloosterman/Dirichlet',
+    'Character/calc-value/Dirichlet',
     'EllipticCurve',
     'Field',
     'GaloisGroup',


Test patch:
Repository: LMFDB/lmfdb

Issue:
EC/Q: code snippets should not use labels for conductors over 500000
Another piece of fallout from the addition of some curves with conductor > 500000 and no Cremona labels, but also an error in the Sage, Magma and Pari/GP scripts (all three!) when displaying a curve with LMFDB labels -- which is the only option for conductor >500000.

In all three languages the users is given two constructions for the curve, one using the a-invariants (which is fine) and one using the label.  This *does not work* for LMFDB labels (none of the three languages can decode them).

I'll probably fix this by not giving the alternative.  A more complicated solution would be, for conductors<500000 when displaying the LMFDB label version of a page,  substitute the Cremona label into the template, and for large conductors, delete the second line of the template.


Discussion:

Resolving patch:
diff --git a/lmfdb/elliptic_curves/web_ec.py b/lmfdb/elliptic_curves/web_ec.py
--- a/lmfdb/elliptic_curves/web_ec.py
+++ b/lmfdb/elliptic_curves/web_ec.py
@@ -571,24 +571,13 @@ def make_torsion_growth(self):
 
     def code(self):
         if self._code is None:
-            self.make_code_snippets()
-        return self._code
-
-    def make_code_snippets(self):
-        # read in code.yaml from current directory:
 
-        _curdir = os.path.dirname(os.path.abspath(__file__))
-        self._code =  yaml.load(open(os.path.join(_curdir, "code.yaml")), Loader=yaml.FullLoader)
+            # read in code.yaml from current directory:
+            _curdir = os.path.dirname(os.path.abspath(__file__))
+            self._code =  yaml.load(open(os.path.join(_curdir, "code.yaml")), Loader=yaml.FullLoader)
 
-        # Fill in placeholders for this specific curve:
+            # Fill in placeholders for this specific curve:
+            for lang in ['sage', 'pari', 'magma']:
+                self._code['curve'][lang] = self._code['curve'][lang] % (self.data['ainvs'])
 
-        for lang in ['sage', 'pari', 'magma']:
-            self._code['curve'][lang] = self._code['curve'][lang] % (self.data['ainvs'],self.lmfdb_label)
-        return
-        for k in self._code:
-            if k != 'prompt':
-                for lang in self._code[k]:
-                    self._code[k][lang] = self._code[k][lang].split("\n")
-                    # remove final empty line
-                    if len(self._code[k][lang][-1])==0:
-                        self._code[k][lang] = self._code[k][lang][:-1]
+        return self._code


Test patch:
Repository: LMFDB/lmfdb

Issue:
Server errors in whitelist check
The URL https://www.lmfdb.org/L/1 generates the following server error in the white_listed function in app.py
```
Exception on /L/1 [GET]
Traceback (most recent call last):
  File "/home/sage/sage-9.2/local/lib/python3.8/site-packages/flask/app.py", line 2447, in wsgi_app
    response = self.full_dispatch_request()
  File "/home/sage/sage-9.2/local/lib/python3.8/site-packages/flask/app.py", line 1952, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/home/sage/sage-9.2/local/lib/python3.8/site-packages/flask/app.py", line 1821, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/home/sage/sage-9.2/local/lib/python3.8/site-packages/flask/_compat.py", line 39, in reraise
    raise value
  File "/home/sage/sage-9.2/local/lib/python3.8/site-packages/flask/app.py", line 1948, in full_dispatch_request
    rv = self.preprocess_request()
  File "/home/sage/sage-9.2/local/lib/python3.8/site-packages/flask/app.py", line 2242, in preprocess_request
    rv = func()
  File "/home/lmfdb/lmfdb-git-web/lmfdb/app.py", line 249, in netloc_redirect
    not white_listed(urlparts.path)
  File "/home/lmfdb/lmfdb-git-web/lmfdb/app.py", line 764, in white_listed
    return white_listed(url[1:]) or url[3].isdigit()
IndexError: string index out of range
[2021-02-02 03:59:37 UTC] 500 error on URL https://www.lmfdb.org/L/1 ()
```


Discussion:

Resolving patch:
diff --git a/lmfdb/app.py b/lmfdb/app.py
--- a/lmfdb/app.py
+++ b/lmfdb/app.py
@@ -761,7 +761,7 @@ def white_listed(url):
     elif url[:2] == "L/":
         # if the origin is allowed
         # or if it is a L-function with a label
-        return white_listed(url[1:]) or url[3].isdigit()
+        return white_listed(url[1:]) or len(url) == 2 or url[2].isdigit()
     else:
         return False
 


Test patch:
Repository: LMFDB/lmfdb

Issue:
High conductor Artin L-function raises a server error
Despite the link not being displayed on the Artin representation page, someone manage to get to it and it raises a server error:
```
Traceback (most recent call last):
  File "/home/sage/sage-9.2/local/lib/python3.6/site-packages/flask/app.py", line 2447, in wsgi_app
    response = self.full_dispatch_request()
  File "/home/sage/sage-9.2/local/lib/python3.6/site-packages/flask/app.py", line 1952, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/home/sage/sage-9.2/local/lib/python3.6/site-packages/flask/app.py", line 1821, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/home/sage/sage-9.2/local/lib/python3.6/site-packages/flask/_compat.py", line 39, in reraise
    raise value
  File "/home/sage/sage-9.2/local/lib/python3.6/site-packages/flask/app.py", line 1950, in full_dispatch_request
    rv = self.dispatch_request()
  File "/home/sage/sage-9.2/local/lib/python3.6/site-packages/flask/app.py", line 1936, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/home/lmfdb/lmfdb-git-dev/lmfdb/lfunctions/main.py", line 867, in wrapper
    return f(*args, **kwds)
  File "/home/lmfdb/lmfdb-git-dev/lmfdb/lfunctions/main.py", line 1066, in l_function_artin_page
    return render_single_Lfunction(ArtinLfunction, {'label': label}, request)
  File "/home/lmfdb/lmfdb-git-dev/lmfdb/lfunctions/main.py", line 1133, in render_single_Lfunction
    L = Lclass(**args)
  File "/home/lmfdb/lmfdb-git-dev/lmfdb/lfunctions/Lfunction.py", line 1261, in __init__
    self.charactermodulus, self.characternumber = cc.modulus, cc.number
AttributeError: 'NoneType' object has no attribute 'modulus'
[2021-02-05 20:37:12 UTC] 500 error on URL https://beta.lmfdb.org/L/ArtinRepresentation/21.150929687443250729638359646544951886873302058011463601.84.a.a/ 
```


Discussion:

Resolving patch:
diff --git a/lmfdb/lfunctions/Lfunction.py b/lmfdb/lfunctions/Lfunction.py
--- a/lmfdb/lfunctions/Lfunction.py
+++ b/lmfdb/lfunctions/Lfunction.py
@@ -1258,6 +1258,8 @@ def __init__(self, **args):
         self.algebraic = True
         self.motivic_weight = 0
         cc = self.artin.central_character()
+        if not cc:
+            raise ValueError('Error constructing Artin representation %s, unable to compute central character, possibly because the modulus is too large.'%self.origin_label)
         self.charactermodulus, self.characternumber = cc.modulus, cc.number
 
         # Compute Dirichlet coefficients and period ########################


Test patch:
Repository: LMFDB/lmfdb

Issue:
Maass form searching error
From the feedback page:

This is a bit of a stupid issue, but the search for Maass forms doesn't allow to search for forms with character 1.1

The search result is an error saying the character is not legal


Discussion:

Resolving patch:
diff --git a/lmfdb/lfunctions/main.py b/lmfdb/lfunctions/main.py
--- a/lmfdb/lfunctions/main.py
+++ b/lmfdb/lfunctions/main.py
@@ -3,12 +3,12 @@
 from flask import (render_template, url_for, request, make_response,
                    abort, redirect)
 
-from sage.all import srange, spline, line, ZZ, QQ, latex, real_part, imag_part, Factorization, Integer, next_prime, prime_range, GCD
+from sage.all import srange, spline, line, ZZ, QQ, latex, Factorization, Integer, next_prime, prime_range, GCD
 
 import tempfile
 import os
 import re
-from collections import defaultdict, Counter
+from collections import Counter
 from markupsafe import escape
 
 from . import LfunctionPlot
@@ -24,7 +24,7 @@
 from .LfunctionComp import isogeny_class_table, genus2_isogeny_class_table
 from .Lfunctionutilities import (
     p2sage, styleTheSign, get_bread, parse_codename,
-    getConductorIsogenyFromLabel, string2number)
+    getConductorIsogenyFromLabel)
 
 from lmfdb.characters.web_character import WebDirichlet
 from lmfdb.lfunctions import l_function_page
diff --git a/lmfdb/maass_forms/main.py b/lmfdb/maass_forms/main.py
--- a/lmfdb/maass_forms/main.py
+++ b/lmfdb/maass_forms/main.py
@@ -176,8 +176,8 @@ def parse_character(inp, query, qfield):
     level_field, conrey_index_field ='level', 'conrey_index'
     level, conrey_index = inp.split('.')
     level, conrey_index = int(level), int(conrey_index)
-    if conrey_index >= level:
-        raise ValueError("Character labels q.n must have Conrey index n less than the modulus q.")
+    if conrey_index > level:
+        raise ValueError("Character labels q.n must have Conrey index n no greater than the modulus q.")
     if gcd(level,conrey_index) != 1:
         raise ValueError("Character labels q.n must have Conrey index coprime to the modulus q.")
     def contains_level(D):


Test patch:
Repository: LMFDB/lmfdb

Issue:
Absolute discriminant in refined search for g2c
Small typo: In the refined search for genus 2 curves/Q, it seems that "Discriminant" should read "Absolute discriminant", similarly to the form of the (not-refined) search page for genus 2 curves/Q. The associated knowl is already pointing to "Absolute discriminant".


Discussion:

Resolving patch:
diff --git a/lmfdb/genus2_curves/main.py b/lmfdb/genus2_curves/main.py
--- a/lmfdb/genus2_curves/main.py
+++ b/lmfdb/genus2_curves/main.py
@@ -575,7 +575,7 @@ def __init__(self):
             name="abs_disc",
             knowl="g2c.abs_discriminant",
             label="Absolute discriminant",
-            short_label="Discriminant",
+            short_label="Absolute discriminant",
             example="169",
             example_span="169, 0-1000",
         )


Test patch:
Repository: LMFDB/lmfdb

Issue:
The "Knowl" page has improperly formatted links.
From the feedback page:


The "Knowl" page (easily accessed from the "Knowl" knowl on the intro page)  https://www.lmfdb.org/knowledge/show/doc.knowl contains a pair of anchor elements that are supposed to direct to the NSF's website, but the HTML for the anchor elements is not outside of the quotation marks for the surrounding text and thus "<a href="http://www.nsf.gov/" target="_blank">National Science Foundation</a>" is rendered on the page rather than just being "National Science Foundation" as clickable text.
To enable screen reader support, press ⌘+Option+Z To learn about keyboard shortcuts, press ⌘slash
 



Discussion:

Resolving patch:
diff --git a/lmfdb/app.py b/lmfdb/app.py
--- a/lmfdb/app.py
+++ b/lmfdb/app.py
@@ -114,7 +114,6 @@ def ctx_proc_userdata():
     vars['meta_description'] = r'Welcome to the LMFDB, the database of L-functions, modular forms, and related objects. These pages are intended to be a modern handbook including tables, formulas, links, and references for L-functions and their underlying objects.'
     vars['shortthanks'] = r'This project is supported by <a href="%s">grants</a> from the US National Science Foundation, the UK Engineering and Physical Sciences Research Council, and the Simons Foundation.' % (url_for('acknowledgment') + "#sponsors")
     vars['feedbackpage'] = r"https://docs.google.com/spreadsheet/viewform?formkey=dDJXYXBleU1BMTFERFFIdjVXVmJqdlE6MQ"
-    vars['LINK_EXT'] = lambda a, b: '<a href="%s" target="_blank">%s</a>' % (b, a)
 
     # debug mode?
     vars['DEBUG'] = is_debug_mode()
diff --git a/lmfdb/knowledge/main.py b/lmfdb/knowledge/main.py
--- a/lmfdb/knowledge/main.py
+++ b/lmfdb/knowledge/main.py
@@ -250,6 +250,7 @@ def render_knowl_in_template(knowl_content, **kwargs):
   {%% from "knowl-defs.html" import KNOWL_LINK with context %%}
   {%% from "knowl-defs.html" import KNOWL_INC with context %%}
   {%% from "knowl-defs.html" import TEXT_DATA with context %%}
+  {%% from "knowl-defs.html" import LINK_EXT with context %%}
 
   %(content)s
   """
@@ -732,6 +733,7 @@ def render_knowl(ID, footer=None, kwargs=None,
   {%% from "knowl-defs.html" import KNOWL_LINK with context %%}
   {%% from "knowl-defs.html" import KNOWL_INC with context %%}
   {%% from "knowl-defs.html" import TEXT_DATA with context %%}
+  {%% from "knowl-defs.html" import LINK_EXT with context %%}
 
   <div class="knowl">"""
     if foot == "1":


Test patch: