XWIKI-8925: The WebDAV edit attachment link is not generated when URLs are rewritten
* Simplify the code that generates the WebDAV URL.
* Also format the HTML code to reduce line length.