Skip to content

Everything inside <script> (also <style>?) has to be escaped automagically #46

Description

@Altai-man

JS bits containing <, e.g. a simple for loop or a condition are parsed as opener tags resulting in a failure:

                if (month.length < 2)
                    month = '0' + month;
                if (day.length < 2)
                    day = '0' + day;

leads to

    Template parse failed: malformed tag at line 54 near '< 2)
                        day = '0' + day'
      in method panic at /home/koto/.rakubrew/versions/moar-2021.05/install/share/perl6/site/sources/DEC52040CAB8F0AC21402372C4D99D4B9A2D7D0D (Cro::WebApp::Template::Parser) line 372
      in regex sequence-element:sym<literal-open-tag> at /home/koto/.rakubrew/versions/moar-2021.05/install/share/perl6/site/sources/DEC52040CAB8F0AC21402372C4D99D4B9A2D7D0D (Cro::WebApp::Template::Parser) line 38

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions