JSON converter module not proccesing strings with '<'

Bug #867198 reported by Carlos Manuel Lopez
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Zorba
Fix Released
High
Sorin Marian Nasoi

Bug Description

I run the next query:

import module namespace json="http://www.zorba-xquery.com/modules/converters/json";
declare variable $json-value = '{"html":"<b>bold</b>"}';
json:parse($json-value)

And I get then next error:
converters\json.xq>:158,3: dynamic error [err:FODC0006]: invalid content passed to fn:parse-xml(): loader parsing error: StartTag: invalid element name

I've noticed that this problem occurs with any string containing '<' so for example if we change the second line for
declare variable $json-value := '{"html":"1 < 2"}'
it still crashes in the same way.

Related branches

Changed in zorba:
milestone: none → 2.1
Changed in zorba:
milestone: 2.1 → none
Changed in zorba:
status: New → Fix Committed
status: Fix Committed → In Progress
Changed in zorba:
status: In Progress → Fix Committed
Changed in zorba:
milestone: none → 2.1
Changed in zorba:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.