[FIX] website_profile,forum: avoid relative links
The origin parameter must be an absolute link (starting with a /) To be consistent and always have a leading slash (and avoid relative links if the developer forgot to add a leading slash)
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
<template id="user_profile_sub_nav" inherit_id="website_profile.user_profile_sub_nav">
|
||||
<xpath expr="//nav" position="before">
|
||||
<div t-if="request.params.get('forum_origin')" class="o_wprofile_all_users_nav_btn_container col pr-0 flex-grow-0">
|
||||
<a t-att-href="(request.website.domain or '') + request.params.get('forum_origin')"
|
||||
<a t-att-href="(request.website.domain or '') + '/' + request.params.get('forum_origin').lstrip('/')"
|
||||
class="o_wprofile_all_users_nav_btn btn text-nowrap">
|
||||
<i class="fa fa-chevron-left small"/> Back
|
||||
</a>
|
||||
|
||||
@@ -394,7 +394,7 @@
|
||||
<nav t-if="request.params.get('url_origin') and request.params.get('name_origin')" aria-label="breadcrumb">
|
||||
<ol class="breadcrumb p-0 bg-white">
|
||||
<li class="breadcrumb-item">
|
||||
<a t-att-href="(request.website.domain or '') + request.params.get('url_origin')" t-esc="request.params.get('name_origin')"/>
|
||||
<a t-att-href="(request.website.domain or '') + '/' + request.params.get('url_origin').lstrip('/')" t-esc="request.params.get('name_origin')"/>
|
||||
</li>
|
||||
<li class="breadcrumb-item">Badges</li>
|
||||
</ol>
|
||||
|
||||
Reference in New Issue
Block a user