question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Assigned attribute values are no longer quoted

See original GitHub issue

I work on a large non-Ember app making extensive use of Emblem templates. We’re currently trying to upgrade from 0.4.0 to current but have encountered what seems to be a breaking change that I don’t see mentioned in the CHANGELOG.

Given this Emblem template: input type="text" placeholder=placeholder, and the value “multiple words” for placeholder, under 0.4.0 the eventual value for placeholder would be wrapped in quotes:

<!-- Output from Emblem 0.4.0 -->
<input type="text" placeholder="multiple words" />

The newest version, however, results in an unquoted attribute value and broken markup:

<!-- Output from Emblem 0.9.0 -->
<input type="text" placeholder=multiple words>

Is this intentional? Are we now meant to use something like attr="{{ variable }}" instead?

Converting ~14k lines of Emblem to use a different attribute assignment syntax would be prohibitive for us. Would you consider a PR that restored the previous behavior? It looks like adding opening and closing quotes to this line in template-compiler.js would have the desired effect.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
thec0kemancommented, Dec 22, 2017

👍 I have a PR that I just opened. I’d like to do a bit of QA, then get it merged as 0.9.3.

0reactions
jmerrifieldcommented, Dec 22, 2017

That would be fine, we control the compilation stage so can easily supply extra options to emblem.compile.

How would you like to proceed? Are you planning to revert this PR and push a fixed version to NPM? We are out for the holidays so may not be able to work on an option-driven implementation until the new year.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Need to assign attribute value in single quote xslt
I generally use the choice between single or double quotes as a classic example of the kind of thing that you can't influence...
Read more >
Configuration Attribute Guidelines - Salesforce Help
As of Salesforce CPQ Summer '17, your configuration attributes can inherit their default values from a quote or quote group. Use this feature...
Read more >
Getting Value of product attribute on cart page even not ...
I am getting the product attribute from quote. It seems there is wrong value comes. Please check my below code.
Read more >
Data Stitch Assign operation for Elements with Attributes
If ASSIGN is copying the attributes along with the value of the element and you do not want the attributes, the use text()...
Read more >
Custom security attributes in Azure AD part 3
To assign our newly created “SSN” attribute to a given user for example, all we need to do is open the Azure AD...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found