I don't know if others have this same problem but often when I'm replacing values in the URL with variables I find that I'm over the size limit within the modeler.
If I search and replace then I often have 100's of lines that are bigger than the maximum line length.
So, I wrote a little vbscript that goes through the script and breaks it in an appropriate place.
It's attached as a .txt file, so just rename it to VBS and run it. It'll ask you for the file name of the script and will return a file with the same filename but with "wrapped.HTP" at the end.
Feel free to use/update/copy this file. If you do something useful why not post it back here?
Everywhere's within walking distance if you have enough time.