max-mapper / max-mapper/packify

Should not try to process script-tag contents for non-javascript types

Open
#3 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
89
Forks
2
PR merge metrics
No merged PRs in 30d

Description

I tried to run packify on HTML that includes text for a Ractive template in a script tag with type-attribute value of "text/html+ractive". Instead of leaving it alone as I would expect, packify apparently tries to parse it as Javascript and ends up generating…

    <script id="app-template" type="text/javascript">console.error("/Users/stevej/Projects/analosizer/src/scriptify_1452628191519.js:2
<fieldset class='panel'>
^
ParseError: Unexpected token")</script>

Notice that my explicitly non-javascript type-attribute value is actually replaced with "text/javascript".

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No file or test is named. Reproduce the issue with an HTML script tag whose type is "text/html+ractive", then trace packify's script-tag processing and JavaScript parsing path. Done means non-JavaScript script contents are left unparsed and the original type attribute is preserved.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.