diff --git a/gluon/rewrite.py b/gluon/rewrite.py index eabefc2c..661a0d27 100644 --- a/gluon/rewrite.py +++ b/gluon/rewrite.py @@ -878,6 +878,7 @@ class MapUrlIn(object): self.domain_application = None self.domain_controller = None self.domain_function = None + self.map_hyphen = base.map_hyphen arg0 = self.harg0 if not base.exclusive_domain and base.applications and arg0 in base.applications: self.application = arg0 @@ -1256,9 +1257,9 @@ class MapUrlOut(object): "Builds a/c/f from components" acf = '' if self.map_hyphen: - self.application = self.application.replace('_', '-') self.controller = self.controller.replace('_', '-') if self.controller != 'static' and not self.controller.startswith('static/'): + self.application = self.application.replace('_', '-') self.function = self.function.replace('_', '-') if not self.omit_application: acf += '/' + self.application