enforce language url subsitution on path boundary#254
enforce language url subsitution on path boundary#254adityatelange merged 1 commit intoadityatelange:masterfrom
Conversation
Shaddee060314
left a comment
There was a problem hiding this comment.
layouts/partials/templates/schema_json.html
|
@oasys Nice Catch ! What if we use like -{{- $lang_url := replace $url ( printf "%s/" .Lang) "/" }}
+{{- $lang_url := replace $url ( printf "%s/" .Lang) "/" 1 }} |
|
I will test later, but I suspect that will only fix when running a multi language config. A single language config will probably still have problems (as in my example, there will be no |
True |
a52d740 to
a52ae2f
Compare
|
How about this? I assume multilingual config always has the lang prefix at the beginning of the URI. Using |
|
This will do the same, but might be more readable: If you prefer this change instead of the |
I agree, sure we can do this way |
Without this, the section name gets mangled when the language was a substring of the section. For example, under 'en', a section named "fragment" changes to "fragmt".
a52ae2f to
8a1270e
Compare
|
Kudos, SonarCloud Quality Gate passed!
|
Done. Thanks! |
…ityatelange#254) * Without this, the section name gets mangled when the language was a sub-string of the section. For example, under 'en', a section named "fragment" changes to "fragmt".
Without this, the section name gets mangled when the language was a
substring of the section. For example, under 'en', a section named
"fragment" changes to "fragmt".