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

Problematic String Error when WebFlow design contains <script> tag #31

Open
dvmorris opened this issue Jun 13, 2016 · 0 comments
Open

Comments

@dvmorris
Copy link

 => stanza -u
===== Regenerate .design/ folder
rm -rf .design/
unzip design.zip -d .design/
Archive:  design.zip
...
===== Regenerate images
rm -rf public/images
mkdir -p public/images
cp .design/images/* public/images
===== Regenerate css
rm -rf client/css
mkdir -p client/css
mkdir -p client/css/lib
cp .design/css/....webflow.css client/css/
cp .design/css/normalize.css client/css/lib
cp .design/css/webflow.css client/css/lib
create client/css/main.css from html head
===== Regenerate components via reacterminator
problematic string:  <body className="body"> <div className="w-section"> <div className="w-container"> <div data-animation="default" data-collapse="medium" data-component-name="Navigation" data-contain="1" data-duration="400" className="w-nav mainnavigationbar"> <div className="w-container mainnavigationbarcontainer"> <a href="#" className="w-nav-brand topleftlogo"><img height="40" src="images/logo-black.png" width="40"/> </a> <h1 className="pageheader"></h1> <nav role="navigation" className="w-nav-menu mainnavigationmenu"><a href="groups.html" className="w-nav-link mainnavigationbutton">Home</a><a href="create-group.html" className="w-nav-link mainnavigationbutton">Add Group</a><a href="create-shift-alert.html" className="w-nav-link mainnavigationbutton">Add Shift Alert</a><a href="create-shift-alert.html" className="w-nav-link mainnavigationbutton">Manage Members</a><a href="settings.html" className="w-nav-link mainnavigationbutton">Settings</a><a href="support.html" className="w-nav-link mainnavigationbutton">Support</a> </nav> <div className="w-nav-button mainnavigationmenutoggle"> <div className="w-icon-nav-menu mainnavigationmenutoggleicon"/> </div> </div> </div> <div data-component-name="CreateShiftAlert" className="w-form createshiftalertformwrapper"> <form data-name="Email Form" data-redirect="/groups" id="email-form" name="email-form"> <label htmlFor="name-2">Name:</label> <input autofocus="autofocus" data-name="Name" id="name" maxlength="256" name="name" placeholder="The name of the shift alert" required="required" type="text" className="w-input"/> <label htmlFor="Start">Start:</label> <div className="w-embed"> <div id="datetimepickerStart" style="margin-bottom:5px" className="input-group date"> <input type="text" className="form-control"/> <span className="input-group-addon"> <span className="fa fa-calendar"> </span> </span> </div> </div> <label htmlFor="End">End:</label> <div className="w-embed w-script"> <div id="datetimepickerEnd" style="margin-bottom:5px" className="input-group date"> <input type="text" className="form-control"/> <span className="input-group-addon"> <span className="fa fa-calendar"> </span> </span> </div> <script type="text/javascript"> var Webflow = Webflow || []; Webflow.push(function () { // DOMready has fired // May now use jQuery and Webflow api $('#datetimepickerStart').datetimepicker({ sideBySide: false, showTodayButton: true, //focusOnShow: false, showClose: true, allowInputToggle: true, defaultDate: moment({hour: moment().hours(), minute: 0}).add(1, "hours") }); $('#datetimepickerEnd').datetimepicker({ useCurrent: false, //Important! See issue #1075 sideBySide: false, showTodayButton: true, //focusOnShow: false, showClose: true, allowInputToggle: true, defaultDate: moment({hour: moment().hours(), minute: 0}).add(13, "hours") }); $("#datetimepickerStart").on("dp.change", function (e) { $('#datetimepickerEnd').data("DateTimePicker").minDate(e.date); }); $("#datetimepickerEnd").on("dp.change", function (e) { $('#datetimepickerStart').data("DateTimePicker").maxDate(e.date); }); }); </script> </div> <label htmlFor="Slots-Available">Slots Available:</label> <div className="w-embed"> <input id="slots_available" value="1" type="number" placeholder="1" min="1" max="10" name="slots_available" data-name="slots_available" required="required" className="w-input"/> </div> <label htmlFor="Slots-Available">Blocks:</label> <div className="w-checkbox w-clearfix"> <input data-name="Checkbox" id="checkbox" name="checkbox" type="checkbox" className="w-checkbox-input"/> <label className="w-form-label" htmlFor="checkbox">Smaller blocks available?</label> </div> <label htmlFor="Special-Instructions">Special Instructions:</label> <input data-name="Special Instructions" id="Special-Instructions" maxlength="256" name="Special-Instructions" placeholder="Enter any special instructions for this shift (e.g. 4 hour blocks available, text ###-###-#### with questions)" type="text" className="w-input"/> <input data-wait="Please wait..." type="submit" value="Submit" className="w-button"/><a href="groups.html" className="w-button formcancelbutton">Cancel</a> </form> <div className="w-form-done"> <p>Thank you! Your submission has been received!</p> </div> <div className="w-form-fail"> <p>Oops! Something went wrong while submitting the form</p> </div> </div> </div> </div> </body>
/usr/local/lib/node_modules/poetic-stanza/node_modules/reacterminator/lib/helpers/parse.js:11
    throw e
    ^

SyntaxError: Unexpected token (1:4365)
    at Parser.pp.raise (/usr/local/lib/node_modules/poetic-stanza/node_modules/reacterminator/node_modules/babylon/lib/parser/location.js:22:13)
    at Parser.pp.unexpected (/usr/local/lib/node_modules/poetic-stanza/node_modules/reacterminator/node_modules/babylon/lib/parser/util.js:89:8)
    at Parser.pp.parseExprAtom (/usr/local/lib/node_modules/poetic-stanza/node_modules/reacterminator/node_modules/babylon/lib/parser/expression.js:517:12)
    at Parser.parseExprAtom (/usr/local/lib/node_modules/poetic-stanza/node_modules/reacterminator/node_modules/babylon/lib/plugins/jsx/index.js:18:22)
    at Parser.pp.parseExprSubscripts (/usr/local/lib/node_modules/poetic-stanza/node_modules/reacterminator/node_modules/babylon/lib/parser/expression.js:272:19)
    at Parser.pp.parseMaybeUnary (/usr/local/lib/node_modules/poetic-stanza/node_modules/reacterminator/node_modules/babylon/lib/parser/expression.js:252:19)
    at Parser.pp.parseExprOps (/usr/local/lib/node_modules/poetic-stanza/node_modules/reacterminator/node_modules/babylon/lib/parser/expression.js:183:19)
    at Parser.pp.parseMaybeConditional (/usr/local/lib/node_modules/poetic-stanza/node_modules/reacterminator/node_modules/babylon/lib/parser/expression.js:165:19)
    at Parser.pp.parseMaybeAssign (/usr/local/lib/node_modules/poetic-stanza/node_modules/reacterminator/node_modules/babylon/lib/parser/expression.js:128:19)
    at Parser.pp.parseExpression (/usr/local/lib/node_modules/poetic-stanza/node_modules/reacterminator/node_modules/babylon/lib/parser/expression.js:92:19)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants