forked from BDQ/deface
-
Notifications
You must be signed in to change notification settings - Fork 127
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 #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 #84, Fixes #100) Unfortunately this breaks any existing deface selectors looking for code, which are somewhat common. Selectors should be updated to cover both code and erb: selector: "code:contains('my_method'), erb:contains('my_method')"
- Loading branch information
Showing
6 changed files
with
56 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
415422f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! Thank you!