Project

General

Profile

Actions

Bug #12609

closed

rexml attribute class is using &quote instead of &quot when replacing " for the XML character entity "

Added by jmarrero (Joseph Marrero) over 8 years ago. Updated over 8 years ago.

Status:
Closed
Target version:
-
[ruby-core:76509]

Description

lib/rexml/attribute.rb to_string method is using &quote instead of &quot when replacing double quotes.

https://www.w3.org/standards/xml/core

States:
" In XML, there are only five built-in character entities: <, >, &, " and ' for <, >, &, " and ' respectively. "

Notice it is &quot and not &quote

Also here is an exaple (http://www.w3schools.com/xml/xml_attributes.asp) on how to use quotes, notice ", ' and &quot are mentioned not &quote this follows the above spec.

The included patch fixes the simple issue.


Files

quot-change.patch (557 Bytes) quot-change.patch patch to correctly use the entity character. jmarrero (Joseph Marrero), 07/21/2016 06:19 PM

Updated by kou (Kouhei Sutou) over 8 years ago

  • Status changed from Open to Closed
  • Assignee set to kou (Kouhei Sutou)

Good catch!
I've applied your patch at r55726.

Updated by nagachika (Tomoyuki Chikanaga) over 8 years ago

  • Backport changed from 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: UNKNOWN to 2.1: REQUIRED, 2.2: REQUIRED, 2.3: REQUIRED

Updated by usa (Usaku NAKAMURA) over 8 years ago

  • Backport changed from 2.1: REQUIRED, 2.2: REQUIRED, 2.3: REQUIRED to 2.1: REQUIRED, 2.2: DONE, 2.3: REQUIRED

ruby_2_2 r55922 merged revision(s) 55726,55727.

Updated by nagachika (Tomoyuki Chikanaga) over 8 years ago

  • Backport changed from 2.1: REQUIRED, 2.2: DONE, 2.3: REQUIRED to 2.1: REQUIRED, 2.2: DONE, 2.3: DONE

ruby_2_3 r55958 merged revision(s) 55726,55727.

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0