Closed evaldez89 closed 4 years ago
Current situation: the request crashes when consulting a RNC which result contains a new line character (\n) on the name.
\n
The code is already scaping the tab character (\t).
\t
When debugging making the request with the RNC 132070801, we can see the response, the issue is when converting the result: ~stdnum/do/rnc.py(147)
~stdnum/do/rnc.py(147)
It crashes when trying to _convert_result ~stdnum/do/rnc.py(115)
_convert_result
~stdnum/do/rnc.py(115)
I propose scaping the \n replacing it with \\n
\\n
for key, value in json.loads(result.replace('\n', '\\n').replace('\t', '\\t')).items())
Thanks for reporting this. It is fixed in feca1fe (I've also added a test for this situation).
Current situation: the request crashes when consulting a RNC which result contains a new line character (
\n
) on the name.The code is already scaping the tab character (
\t
).When debugging making the request with the RNC 132070801, we can see the response, the issue is when converting the result:![image](https://user-images.githubusercontent.com/12959163/89091205-bf292300-d375-11ea-81fc-2c271c6d0899.png)
~stdnum/do/rnc.py(147)
It crashes when trying to![image](https://user-images.githubusercontent.com/12959163/89091247-1a5b1580-d376-11ea-9c00-1898d1c9812b.png)
_convert_result
~stdnum/do/rnc.py(115)
I propose scaping the
\n
replacing it with\\n