[dokuwiki] Re: Duplicate slash patch

  • From: Christopher Smith <chris@xxxxxxxxxxxxx>
  • To: dokuwiki@xxxxxxxxxxxxx
  • Date: Fri, 18 Apr 2008 11:33:56 +0100

Hi Ilya,

I've sent Andi a slighltly different patch to correct this problem.

You're right in today's message, the correct adjustment is to remove any trailing slash from $conf['baseurl']. Yesterday's patch required a trailing slash, where as dokuwiki documentation does not state its required.

My patch uses rtrim rather than preg_replace and updates the rest of the function to make it resilient to the vagaries of leading and trailing slashes on user supplied config values.

- Chris

On 18 Apr 2008, at 04:28, Ilya S. Lebedev wrote:

But proper one is !/+$! reg to kill trailing slashes from the host, i
forgot to add the following test.


AG> Can you explain what the exact problem was?

DOKU_URL containing http://example.com//, http://example.com//wiki/
breaks compressed CSS files, because compressor recognizes 2nd
duplicate slash as a comment. I prefer to fix invalid url at first.

Best regards,
Ilya                          mailto:ilya@xxxxxxxxxxx<dupslash.patch>

DokuWiki mailing list - more info at

Other related posts: