Reply to: Spaces in the URLAugust 11, 2010 at 7:48 pm
Ah, now I think I understand.
I'm still a little confused because I'm not sure why having the %20 in the URL is a concern. Did your website people give a reason? You say the project manager doesn't allow spaces. So, because there are no spaces in the URL I'm not sure what the issue is. Or are they saying the %20 and space are identical (ie: it is not that the URL is illegal, it is that they think %20 is ugly)?
The thing that might be confusing everyone here is that different browsers display %20 differently in the address bar. In some browsers if a URL contains %20 it is rendered as %20 (IE is one) and some browsers “help” you by rendering the %20 as a space (presumably because this is easier to read and understand). Our code is telling the browser to use %20, it is the browser that is rendering a space, not us (this is true for FireFox). If you have both browsers installed and open the same output in each you should see what I mean.
To show that this is a browser behavior you can visit any website that has %20 in the URL (or set up your own test). You will see different rendering behavior in different browsers. In FireFox (which shows %20 as a space) if you copy such a URL from FireFox and paste it into a text editor you will see the %20 magically appear there, because under the covers FireFox actually knows it is there and puts the %20 on the clipboard, it is just rendering it as a space in the address bar.
The alternative might be to simply generate output using the standard DITA OT transtype 'XHTML' (which we expose in our Generate Output dialog as “Multiple HTML”) and then let the website people integrate those HTML files into the website, creating their own framework around them (if they want frames or not, TOC, searching, etc).