New line ("\n") being ignored

I’m loading some text from XML into a class variable. When using the variable to set the text of a Textfield instance, the "
" is ignored. Any idea why?

My workaround is:

textfield.text = object.name.split( "[URL="file://\ "]
" ).join( "
" );

Is there a better solution?