mirror of
https://github.com/ruby/ruby.git
synced 2025-09-17 17:43:59 +02:00
merge revision(s) 39384:
* lib/rexml/document.rb (REXML::Document.entity_expansion_text_limit): new attribute to read/write entity expansion text limit. the default limit is 10Kb. * lib/rexml/text.rb (REXML::Text.unnormalize): check above attribute. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@39387 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
654a363229
commit
11d79c680f
5 changed files with 65 additions and 17 deletions
|
@ -255,6 +255,18 @@ module REXML
|
|||
return @@entity_expansion_limit
|
||||
end
|
||||
|
||||
@@entity_expansion_text_limit = 10_240
|
||||
|
||||
# Set the entity expansion limit. By default the limit is set to 10240.
|
||||
def Document::entity_expansion_text_limit=( val )
|
||||
@@entity_expansion_text_limit = val
|
||||
end
|
||||
|
||||
# Get the entity expansion limit. By default the limit is set to 10000.
|
||||
def Document::entity_expansion_text_limit
|
||||
return @@entity_expansion_text_limit
|
||||
end
|
||||
|
||||
attr_reader :entity_expansion_count
|
||||
|
||||
def record_entity_expansion
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue