Class: REXML::Entity

Inherits:
Child
  • Object
show all
Defined in:
lib/rexml-expansion-fix.rb

Instance Method Summary collapse

Instance Method Details

#unnormalizedObject



20
21
22
23
24
25
26
27
28
29
30
31
32
# File 'lib/rexml-expansion-fix.rb', line 20

def unnormalized
  # Due to an optimisation in REXML, the default entities aren't
  # associated with a document.  As these enties are defined and
  # not recursive, we know that expanding them won't cause any
  # issues.  Other entities in the document will still have
  # the association to the document preventing this from opening
  # a new attack vector.
  document.record_entity_expansion! if document
  v = value()
  return nil if v.nil?
  @unnormalized = Text::unnormalize(v, parent)
  @unnormalized
end