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

Deface, Bootstrap and tag <code> #101

Closed
m3nd3s opened this issue Jul 24, 2013 · 0 comments
Closed

Deface, Bootstrap and tag <code> #101

m3nd3s opened this issue Jul 24, 2013 · 0 comments

Comments

@m3nd3s
Copy link

m3nd3s commented Jul 24, 2013

Hi,

Twitter Boostrap also make use of tag <code>, when Deface found this tag in erb source its replaces for %> even when not necessary.

For example:

For example, <code>&lt;section&gt;</code> should be wrapped as inline.

Will generate something like:

For example, <code>&lt;section&gt;%> should be wrapped as inline.
jhawthorn added a commit to jhawthorn/deface that referenced this issue Sep 3, 2013
This changes the ERB template parser to use `<erb>` rather than `<code>`
to designate code blocks in a template.

For example:

    <%= render template: 'foo/bar' %>

Used to parse as:

    <code erb-loud> render template: 'foo/bar' </code>

But not parses as:

    <erb erb-loud> render template: 'foo/bar' </erb>

This fixes a number of problems that result from using `<code>`:

* There may be </code> tags in the original ERB, which would be turned
  into `%>`
  (Fixes spree#101)

* Any <code> tags in the <head> of a document would be moved to the
  body, since <code> is a real HTML tag, and isn't allowed in the head.
  This happens in nokogiri under jRuby or libXML 2.9.0
  (Fixes spree#84, Fixes spree#100)
@BDQ BDQ closed this as completed in 415422f Sep 4, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant