Trailing backslash in element text causes infinite loop
Status: Beta
Brought to you by:
psychogenic
If an element's text ends in a backslash, the parser will
get thrown into an infinite recursive loop. Since this is
legal in a well formed document, this situation needs to
be properly handled by the parser. I have attached a
program that illustrates this problem as well as another
problem documented in a previous ticket I posted. If the
attached file fails to reproduce the error, please let me
know and I will send a bundle of my perl package along
with my OS information and list of installed libraries.
-Theron
Program to reproduce this bug and a bug from a previous ticket.
Logged In: YES
user_id=726335
As it turns out, the loop is happening in the Text::Balanced
module. After looking at the source code I did the following:
$XML::Mini::Document::TextBalancedAvailable = 0;
This made the infinite recursion problem go away in my
example program. I would have to look further in to the
problem, but I'm sure a solution exists to use Text::Balanced
without risking an infinite loop. In the mean time, I will be
turning off Text::Balanced using the above line until a solution
or patch is posted.
Thanks for the awesome work. I love this library. It makes
my life much simpler.
-Theron