Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

This is the gem containing the monkeypatch fix for REXML

branch: master

Handle a bug which prevented parsing in some circumstances.

If your document had a custom doc-type and your body contained < > " or ' the previous
version would cause a NoMethodError.  This is caused by an optimisation in REXML which means those
entities don't have an association to their Document.
latest commit 784f16ba7d
Michael Koziarski authored August 31, 2008
Octocat-spinner-32 lib Handle a bug which prevented parsing in some circumstances. August 31, 2008
Octocat-spinner-32 .gitignore Initial fix August 22, 2008
Octocat-spinner-32 LICENSE Initial fix August 22, 2008
Octocat-spinner-32 README.textile Initial fix August 22, 2008
Octocat-spinner-32 example.xml Initial fix August 22, 2008
Octocat-spinner-32 rexml-expansion-fix.gemspec Handle a bug which prevented parsing in some circumstances. August 31, 2008
README.textile

REXML Expansion Fix

The version of rexml which ships with ruby at present will not restrict the total number of entity expanstions when processing inline attributes. This can allow specially crafted documents to consume enormous amounts of CPU. To prevent this from happening this fix causes processing to abort processing after a certain number of expansions have taken place. The limit defaults to 10000 but you can change it as follows:

REXML::Document.entity_expansion_limit= 50

The example xml in example.xml can be used to verify that your application is safe.

Something went wrong with that request. Please try again.