use html5writer if it's available
fix urls
preview