Using < and > with Prawn 0.6.3

28 views
Skip to first unread message

macsig

unread,
Dec 8, 2009, 1:52:53 PM12/8/09
to Prawn
Hello guys,
after updating to version 0.6.3 (form 0.4.1) I have some issues with
Prawn::Format::Lexer::InvalidFormat. unclosed tag

Basically in the report I have texts like "< 3.6 pH units" and looks
like Prawn 0.6.3 doesn't like the minus sign.

Is there a way to force Prawn no to consider the minus sign as a
opening tag element?
Otherwise, any turnarounds?


Thanks and have a nice day!


Sig

Henrik Nyh

unread,
Dec 8, 2009, 2:02:06 PM12/8/09
to prawn...@googlegroups.com
Use &lt; as you would in HTML, or do

text "foo < bar", :plain => true

I define a h() method and use that:

def h(text)
CGI.escapeHTML(text)
end

Note that prawn-format will not be supported in Prawn 0.7+ until it
gets a maintainer again.

macsig

unread,
Dec 8, 2009, 2:15:54 PM12/8/09
to Prawn
Hello Henrik,
thanks for your reply: CGI.escapeHTML works just fine.

Have a nice day.


Sig

On Dec 8, 11:02 am, Henrik Nyh <hen...@nyh.se> wrote:
Reply all
Reply to author
Forward
0 new messages