From 578a8ab24aff92ff2aadd8f79f051705fc5f4f4d Mon Sep 17 00:00:00 2001 From: Domizio Demichelis Date: Sun, 27 Mar 2011 09:26:42 -0400 Subject: [PATCH] escape closed parens in dryml text [#898 state:resolved] --- dryml/lib/dryml/template.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dryml/lib/dryml/template.rb b/dryml/lib/dryml/template.rb index c602b167d..6281c1b4d 100644 --- a/dryml/lib/dryml/template.rb +++ b/dryml/lib/dryml/template.rb @@ -133,6 +133,7 @@ def text_with_scriplets_to_erb(s) when scriplet_rex t when /\S+/ + t.gsub!(/\)/, '\)') "<% safe_concat %(#{t}) %>" else t @@ -549,7 +550,7 @@ def polymorphic_call_type(el) 'this_type' elsif t =~ /^[A-Z]/ t - elsif t =~ /^[a-z]/ && defined? HoboFields.to_class + elsif t =~ /^[a-z]/ && defined?(HoboFields.to_class) klass = HoboFields.to_class(t) klass.name elsif is_code_attribute?(t)