Handle CR/LF characters in element values

Fixes issue #21