Project

General

Profile

Bug #6213

Builder::XmlMarkup drops html_safe

Added by eike.rb (Eike Dierks) over 5 years ago. Updated over 5 years ago.

Status:
Third Party's Issue
Priority:
Normal
Assignee:
-
Target version:
-
[ruby-core:<unknown>]

Description

A single line in Builder::XmlMarkup needs to be changed slightly,
to enable the builder to work with the html_safe flag that was introduced with rails3.

like

def method_missing(sym, *args, &block)
      [...]
      text = arg.to_s   # changed this line to keep the html_safe flag

History

#1 [ruby-core:43789] Updated by nobu (Nobuyoshi Nakada) over 5 years ago

  • Status changed from Open to Feedback
  • Priority changed from 5 to 3

What is Builder::XmlMarkup?

#2 [ruby-core:43790] Updated by shyouhei (Shyouhei Urabe) over 5 years ago

  • Status changed from Feedback to Third Party's Issue

I guess it is the builder gem.

#3 [ruby-core:44097] Updated by eike.rb (Eike Dierks) over 5 years ago

shyouhei (Shyouhei Urabe) wrote:

I guess it is the builder gem.

Hi Shyouhei,
you're probably right that this is in a third party gem,
but the xml builder is quite a central gem.
so you might want to give me some advice,
to whom I'd should report this?

Thinking about that,
I'd really want to get the builder into the core of ruby.
So that we can improve on the builder within here.

I'd like to improve the builder, so that it would work nicely
with the html_safe of rails3

Which actually boils down to not escaping things,
that do have the safe flag set.

And declaring all output of the xmlbuilder html_safe
by definition.

It was not really easy to inject into the current xmlbuilder.
And it's not yet really safe.

I want to get the builder into the core of ruby (and rails)
and to make it a first line aproach for building markup.

And I want to make it really safe.

I had a close look at the code base of the builder,
(it works quite well as of today)

But we might need to rewrite that.
But the builder concept is big!

#4 [ruby-core:44098] Updated by naruse (Yui NARUSE) over 5 years ago

eike.rb (Eike Dierks) wrote:

you're probably right that this is in a third party gem,
but the xml builder is quite a central gem.
so you might want to give me some advice,
to whom I'd should report this?

Why don't you google it?

#5 [ruby-core:44109] Updated by nobu (Nobuyoshi Nakada) over 5 years ago

=begin
"metadata" in builder-3.0.0.gem contains:
authors:
- Jim Weirich
email: jim@weirichhouse.org
homepage: http://onestepback.org
=end

#6 [ruby-core:44143] Updated by eike.rb (Eike Dierks) over 5 years ago

Hi nobu,
I wrote to jim

I want to make this builder concept
into the core of ruby.

I just love this idea,
of an object of being in full controll
of all and any messages send to it.

That's a proxy

Also available in: Atom PDF