Long URL's need to wrap, but still be clickable in the PDF. To make the long URL (or any text) wrap, FOP requires a space of some kind. I have tried to pre-process my XML inserting a zero-width space (​). This looks OK in the PDF as it wraps and the tooltip works fine, but when clicking it, the hyperlink doesn't work as it has inserted a question mark ("?") in the position of the zero-width space. I have also inserted a normal space (" ") instead of the zero-width space. This will force the wrapping of the long URL and works when clicking on it, but the tooltip shows the space and since I want all "/" replaced with "/ ", this looks terrible.
There seems to be a misunderstanding. I suppose the URL from the source appears twice in the intermediate FO, once as external-destination and another time as text, like <fo:basic-link external-destination="url(http://foo.bar/)">http://foo.bar/ </fo:basic-link> The URL in the text can be processed as you like, but the URL in the external-destination property should not be processed at all. Adjust your computations, or if you think otherwise, reopen the bug and supply a small, self-contained FO file which demonstrates your problem.
batch transition to closed remaining pre-FOP1.0 resolved bugs