Skip to content

Crash when parser error on non-ascii content #433

Open
@epage

Description

@epage
static SIMPLE_TEMPLATE_LIQUID: &str = "
<html>
  <head>
    <title>{{ product.name }}</title>
  </head>
  <body>
    <h1>{{ product.name }} - {{ product.manufacturer | upcase }}</h1>
    <p>{{ product.summary }}</p>
    <p>£{{ product.price * 1.20 }} (VAT inc.)</p>
    <p>Look at reviews from your friends {{ username }}</p>
    <button>Buy!</button>
  </body>
</html>
";

Error was from

  • crates/core/src/parser/parser.rs
  • let mut text = String::from(&invalid_token_position.line_of()[..offset_c]);
    We sliced into the middle of stuff

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugNot as expected

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions