trim seems to handle <j/> correctly now, but needs more testing