ActionsLike0
Bug #10630
closed
ERB tags nested in escaped blocks are skipped
ruby -v:
2.3.5
Backport:
Description
Hello,
First of all, is this a good place to report Erubis bugs? Their GitHub repo is stale (no action since 2011) and I was suggested by the Rails team to try here.
GitHub ticket: https://github.com/kwatch/erubis/issues/6
Repro example: https://github.com/rails/rails/issues/18098#issuecomment-67667400
It seems that ERB (Erubis) doesn't handle well tags embedded within another tag. My goal is to produce ERB code with some values prefilled in the first pass.
Input ERB code:
<div>
<%%= Results: <%= 'first' %> | <%= 'second' %> | <%= 'third' %> %>
</div>
Produces the following output:
<div>
<%= Results: <%= 'first' %> | second | third %>
</div>
Expected output is:
<div>
<%= Results: first | second | third %>
</div>
The first nested ERB tag is skipped. The same happens when there is just one block nested.
This is reproducible in Rails v4.1.8, which is using Erubis v2.7.0.
Updated by nobu (Nobuyoshi Nakada) over 10 years ago
- Status changed from Open to Third Party's Issue
Updated by tonci (Tonči Damjanić) over 7 years ago
- Status changed from Third Party's Issue to Open
- ruby -v changed from 2.1.5 to 2.3.5
Updated by nobu (Nobuyoshi Nakada) over 7 years ago
- Status changed from Open to Rejected
Updated by k0kubun (Takashi Kokubun) over 7 years ago
- Status changed from Rejected to Third Party's Issue
ActionsLike0