fix rdf-query issue to support new lines in strings
add macro to HTML encode strings before display