aboutsummaryrefslogtreecommitdiffstats
path: root/lib/rexml/document.rb
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-02-22 09:35:46 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-02-22 09:35:46 +0000
commit1ad9075734a7fd9d58920c714953ec851efcae6b (patch)
tree58aebc91254ba8f04466e3569349dfca9f0aaea9 /lib/rexml/document.rb
parent7dd6e08b93a750d962fee51eeaec726caf8dc82e (diff)
downloadruby-1ad9075734a7fd9d58920c714953ec851efcae6b.tar.gz
* 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/trunk@39384 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rexml/document.rb')
-rw-r--r--lib/rexml/document.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/rexml/document.rb b/lib/rexml/document.rb
index f9fdbdaab3..c5280374ca 100644
--- a/lib/rexml/document.rb
+++ b/lib/rexml/document.rb
@@ -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