Admin/website/build/pypager.py
changeset 16619 94e3d94b426d
parent 16590 1a6ec7343ba9
child 17686 8c700928401c
equal deleted inserted replaced
16618:27b62ff6f452 16619:94e3d94b426d
   158 
   158 
   159         """<?mirror prefix="..." title="..." [stripprefix="..."] ?> - generates a mirror switch link,
   159         """<?mirror prefix="..." title="..." [stripprefix="..."] ?> - generates a mirror switch link,
   160            where prefix denotes the base root url of the mirror location
   160            where prefix denotes the base root url of the mirror location
   161            and title the visible description"""
   161            and title the visible description"""
   162 
   162 
       
   163         title = title.replace(u" ", unichr(160))
   163         thisloc = self._pc.relLocOfThis()
   164         thisloc = self._pc.relLocOfThis()
   164         if thisloc.startswith(stripprefix):
   165         if thisloc.startswith(stripprefix):
   165             thisloc = thisloc[len(stripprefix):]
   166             thisloc = thisloc[len(stripprefix):]
   166         else:
   167         else:
   167             raise Exception("Incompatible mirror (prefix to strip not found): %s" % title.encode("latin-1"))
   168             raise Exception("Incompatible mirror (prefix to strip not found): %s" % title.encode("latin-1"))