[static web] fix fckeditor static files delivery: remove leading subpath and url parameters from computed file path
authorFlorent Cayré <florent.cayre@logilab.fr>
Thu, 12 Apr 2012 13:55:18 +0200
changeset 8369 e538ad6f9b99
parent 8368 062c9c7fe502
child 8370 7a15f476dbb3
[static web] fix fckeditor static files delivery: remove leading subpath and url parameters from computed file path
web/views/staticcontrollers.py
--- a/web/views/staticcontrollers.py	Wed Apr 11 16:47:30 2012 +0200
+++ b/web/views/staticcontrollers.py	Thu Apr 12 13:55:18 2012 +0200
@@ -207,6 +207,9 @@
         else:
             uiprops = config.uiprops
         relpath = self.relpath
+        if relpath.startswith('fckeditor/'):
+            relpath = relpath[len('fckeditor/'):]
+        relpath = relpath.split('?', 1)[0]
         return self.static_file(osp.join(uiprops['FCKEDITOR_PATH'], relpath))