mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-07-30 13:05:50 +03:00
0023864: An & symbol is read incorrectly from a XML Ocaf file
A line is uncommented. This line sets the successfully read & symbol. Correction and adding test cases for issue CR23864
This commit is contained in:
parent
d3c5411b48
commit
80cd454f1d
@ -90,7 +90,7 @@ char * LDOM_CharReference::Decode (char * theSrc, Standard_Integer& theLen)
|
|||||||
}
|
}
|
||||||
else if (IS_EQUAL(aSrcPtr+1, "amp;")) {
|
else if (IS_EQUAL(aSrcPtr+1, "amp;")) {
|
||||||
aDstPtr = aSrcPtr - anIncrCount + 1;
|
aDstPtr = aSrcPtr - anIncrCount + 1;
|
||||||
// aDstPtr[-1] = '&';
|
aDstPtr[-1] = '&';
|
||||||
anIncrCount += 4;
|
anIncrCount += 4;
|
||||||
aSrcPtr += 5;
|
aSrcPtr += 5;
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
puts "TODO OCC12345 ALL: OCC170 Error"
|
|
||||||
|
|
||||||
puts "========================"
|
puts "========================"
|
||||||
puts "OCC170"
|
puts "OCC170"
|
||||||
puts "(case 3)"
|
puts "(case 3)"
|
||||||
|
22
tests/bugs/caf/bug23864
Normal file
22
tests/bugs/caf/bug23864
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
puts "============"
|
||||||
|
puts "OCC23864"
|
||||||
|
puts "============"
|
||||||
|
puts ""
|
||||||
|
###################################################################################################################
|
||||||
|
# An & symbol is read incorrectly from a XML Ocaf file
|
||||||
|
###################################################################################################################
|
||||||
|
|
||||||
|
#Open an Ocaf XML document
|
||||||
|
Open [locate_data_file bug23864_testAmp.xml] D
|
||||||
|
|
||||||
|
#Get name attribute (containing an & symbol)
|
||||||
|
GetName D 0:1
|
||||||
|
|
||||||
|
#Get an array of strings (containing an & symbol)
|
||||||
|
set info [GetExtStringArray D 0:1]
|
||||||
|
|
||||||
|
if { [regexp "\&" $info] != 1 } {
|
||||||
|
puts "Error : An \& symbol is read incorrectly from a XML Ocaf file"
|
||||||
|
} else {
|
||||||
|
puts "OK : An \& symbol is read correctly from a XML Ocaf file"
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user