I wonder if a slightly safer/preferable approach here would be this:
```ruby
"<%= render :template => #{identifier.to_json} %>"
```
That way in case the identifier regex was changed to something more liberal, it still wouldn't create change for arbitrary code execution.