-1

I'm not a flask pro, but is there a limit to the size of a string being pasted into a template?

My template looks sth like this:

{% if taint is not none and url is not none %}
    [...]
    }
    update(d);
    }

    </script>
    <a href="data:image/svg+xml;base64,{{ url }}" target="_blank"><center><i>See full context</i></center></a>
</div>
{% endif %}

The variable url contains the following data when printed in the app.py (main loop): https://pastebin.com/RZLuRSJC

But the data never ends up in the rendered site:

    [...]
      d.children = null;
    } else {
        d.children = d._children;
        d._children = null;
    }
    update(d);
    }

    </script>
    <a href="data:image/svg+xml;base64," target="_blank"><center><i>See full context</i></center></a>
</div>

Any ideas why that is? The data is an svg image.

reijin
  • 133
  • 10
  • How are you passing `url` to the template? – roganjosh Jul 04 '18 at 14:32
  • thanks for the tip! I'm actually working in a small student team and had to figure out the code of an other student. My mistake was to pass only the `taint` variable in the `render_template()` method! Thanks for your hint! :) – reijin Jul 04 '18 at 14:43

1 Answers1

0

I'm actually working in a small student team and had to figure out the code of an other student. My mistake was to pass only the taint variable in the render_template() method! Thanks for your hint! :)

reijin
  • 133
  • 10