Ticket #166 (new defect)

Opened 6 weeks ago

unguarded output wrapping

Reported by: nitAnts Owned by: ser
Priority: normal Milestone:
Component: DOM Version: 3.1.6
Severity: normal Keywords: wrap
Cc: Ruby version: 1.8.5
Operating system: Linux

Description

In rexml/formatters/pretty.rb, the private function wrap, it crashes if a string longer than 80 characters has no space inside. Since then the variable 'place' will be nil instead of an integer.

I fix it by simply skip the wrap function if no space is found in the input string and simply return the original string.

Note: See TracTickets for help on using tickets.