Hi Brian,
Some belated response: Could you show us your code?
With the following RESTXQ code, all newlines should be preserved:
declare
%rest:path('in')
%output:method('html')
function local:get() {
<form action='out' method='post'>
<textarea name='text'>A{ char('\n') }B</textarea>
<input type='submit'/>
</form>
};
declare
%rest:POST
%rest:path('out')
%rest:form-param('text', '{$text}')
%output:method('html')
function local:out($text) {
<html>Codepoints: { string-to-codepoints($text) }</html>
};
Best,
Christian