Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash when parser error on non-ascii content #433

Open
epage opened this issue Feb 27, 2021 · 0 comments
Open

Crash when parser error on non-ascii content #433

epage opened this issue Feb 27, 2021 · 0 comments
Labels
bug Not as expected

Comments

@epage
Copy link
Member

epage commented Feb 27, 2021

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
@epage epage added the bug Not as expected label Feb 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Not as expected
Projects
None yet
Development

No branches or pull requests

1 participant