fix improper redirect URLs

pull/2/head
Aevann1 2022-11-19 23:33:59 +02:00
parent 37104be217
commit 44aa666a4d
7 changed files with 25 additions and 25 deletions

View File

@ -345,13 +345,13 @@
</li>
{% else %}
<li id="voting-{{c.id}}-mobile" class="voting list-inline-item d-md-none">
<span tabindex="0" class="arrow-{{c.id}}-mobile-up mx-0 pr-1 arrow-mobile-up" onclick="location.href='/login?redirect={{request.path | urlencode}}';">
<span tabindex="0" class="arrow-{{c.id}}-mobile-up mx-0 pr-1 arrow-mobile-up" onclick="location.href='/login?redirect={{request.full_path | urlencode}}';">
<i class="fas fa-arrow-alt-up mx-0" aria-hidden="true"></i>
</span>
<span class="comment-mobile-score-{{c.id}} score{% if c.controversial %} controversial{% endif %}"{% if not c.is_banned %} data-bs-toggle="tooltip" data-bs-placement="top" title="+{{ups}} | -{{downs}}"{% endif %}style="cursor: default">{{score}}</span>
<span tabindex="0" class="arrow-{{c.id}}-mobile-down arrow-mobile-down mx-0 pl-1 my-0" onclick="location.href='/login?redirect={{request.path | urlencode}}';">
<span tabindex="0" class="arrow-{{c.id}}-mobile-down arrow-mobile-down mx-0 pl-1 my-0" onclick="location.href='/login?redirect={{request.full_path | urlencode}}';">
<i class="fas fa-arrow-alt-down mx-0" aria-hidden="true"></i>
</span>
</li>
@ -379,7 +379,7 @@
<button type="button" tabindex="0" onclick="vote('comment', '{{c.id}}', '1')" class="comment-{{c.id}}-up btn caction py-0 m-0 px-3 nobackground arrow-up upvote-button mx-0 comment-{{c.id}}-up {% if voted==1 %}active{% endif %}"></button>
{% else %}
<button type="button" tabindex="0" class="comment-{{c.id}}-up btn caction nobackground py-0 m-0 px-3 arrow-up" onclick="location.href='/login?redirect={{request.path | urlencode}}';"></button>
<button type="button" tabindex="0" class="comment-{{c.id}}-up btn caction nobackground py-0 m-0 px-3 arrow-up" onclick="location.href='/login?redirect={{request.full_path | urlencode}}';"></button>
{% endif %}
@ -396,7 +396,7 @@
{% else %}
<button type="button" {% if DISABLE_DOWNVOTES %}style="display:None!important"{% endif %} tabindex="0" class="comment-{{c.id}}-down btn caction py-0 m-0 px-3 nobackground arrow-down" onclick="location.href='/login?redirect={{request.path | urlencode}}';"></button>
<button type="button" {% if DISABLE_DOWNVOTES %}style="display:None!important"{% endif %} tabindex="0" class="comment-{{c.id}}-down btn caction py-0 m-0 px-3 nobackground arrow-down" onclick="location.href='/login?redirect={{request.full_path | urlencode}}';"></button>
{% endif %}

View File

@ -125,7 +125,7 @@
{% if v %}
<a class="mobile-nav-icon d-md-none" href="{% if sub %}/h/{{sub}}{% endif %}/submit"><i class="fas fa-feather-alt align-middle text-gray-500 black"></i></a>
{% else %}
<a class="mobile-nav-icon d-md-none" href="/login?redirect={{request.path | urlencode}}"><i class="fas fa-feather-alt align-middle text-gray-500 black"></i></a>
<a class="mobile-nav-icon d-md-none" href="/login?redirect={{request.full_path | urlencode}}"><i class="fas fa-feather-alt align-middle text-gray-500 black"></i></a>
{% endif %}
<a class="mobile-nav-icon d-md-none" href="/random_user"><i class="fas fa-music align-middle text-gray-500 black"></i></a>
@ -274,10 +274,10 @@
<a class="btn btn-primary" href="/contact">Contact us</a>
</li>
<li class="nav-item d-flex align-items-center justify-content-center mx-1">
<a class="btn btn-primary" href="/login?redirect={{request.path | urlencode}}">Sign in</a>
<a class="btn btn-primary" href="/login?redirect={{request.full_path | urlencode}}">Sign in</a>
</li>
<li class="nav-item d-flex align-items-center justify-content-center mx-1">
<a class="btn btn-primary" href="/signup?redirect={{request.path | urlencode}}">Sign up</a>
<a class="btn btn-primary" href="/signup?redirect={{request.full_path | urlencode}}">Sign up</a>
</li>
{% endif %}
</ul>
@ -342,10 +342,10 @@
<a class="btn btn-primary btn-block" href="/contact">Contact us</a>
</li>
<li class="nav-item d-flex align-items-center justify-content-center pb-3">
<a class="btn btn-primary btn-block" href="/login?redirect={{request.path | urlencode}}">Sign in</a>
<a class="btn btn-primary btn-block" href="/login?redirect={{request.full_path | urlencode}}">Sign in</a>
</li>
<li class="nav-item d-flex align-items-center justify-content-center">
<a class="btn btn-primary btn-block" href="/signup?redirect={{request.path | urlencode}}">Sign up</a>
<a class="btn btn-primary btn-block" href="/signup?redirect={{request.full_path | urlencode}}">Sign up</a>
</li>
{% endif %}
<li class="mt-3">

View File

@ -57,8 +57,8 @@
<button type="button" id="follow-sub" class="btn btn-primary btn-follow {% if v.follows(sub.name) %}d-none{% endif %}" onclick="postToastSwitch(this,'/h/{{sub}}/follow','follow-sub','unfollow-sub','d-none')"><i class="fas fa-bell mr-2"></i>Follow {{hole_prefix}}{{sub}}</button>
<button type="button" id="unfollow-sub" class="btn btn-primary btn-follow {% if not v.follows(sub.name) %}d-none{% endif %}" onclick="postToastSwitch(this,'/h/{{sub}}/unfollow','follow-sub','unfollow-sub','d-none')"><i class="fas fa-bell-slash mr-2"></i>Unfollow {{hole_prefix}}{{sub}}</button>
{% else %}
<a class="btn btn-primary btn-block" href="/login?redirect={{request.path | urlencode}}"><i class="fas fa-eye-slash mr-2"></i>Block {{hole_prefix}}{{sub}}</a>
<a class="btn btn-primary btn-block" href="/login?redirect={{request.path | urlencode}}"><i class="fas fa-bell mr-2"></i>Follow {{hole_prefix}}{{sub}}</a>
<a class="btn btn-primary btn-block" href="/login?redirect={{request.full_path | urlencode}}"><i class="fas fa-eye-slash mr-2"></i>Block {{hole_prefix}}{{sub}}</a>
<a class="btn btn-primary btn-block" href="/login?redirect={{request.full_path | urlencode}}"><i class="fas fa-bell mr-2"></i>Follow {{hole_prefix}}{{sub}}</a>
{% endif %}
{% endif %}

View File

@ -69,7 +69,7 @@
{%- endif %}
{% else %}
<button type="button" class="col px-0 mr-3 btn btn-dead m-0" style="background: None !important; border: None;">
<a href="/signup?redirect={{request.path | urlencode}}" class="text-decoration-none">
<a href="/signup?redirect={{request.full_path | urlencode}}" class="text-decoration-none">
<div class="text-center text-muted">
<i class="fas fa-user-plus text-lg"></i>
<div class="text-small">Sign Up</div>

View File

@ -255,10 +255,10 @@
{% else %}
<div id="voting" class="voting d-mob-none mb-auto">
<div tabindex="0" role="button" class="post-{{p.id}}-up arrow-up mx-auto" onclick="location.href='/login?redirect={{request.path | urlencode}}';">
<div tabindex="0" role="button" class="post-{{p.id}}-up arrow-up mx-auto" onclick="location.href='/login?redirect={{request.full_path | urlencode}}';">
</div>
<span class="post-{{p.id}}-score-none score text-muted{% if p.controversial %} controversial{% endif %}"{% if not p.is_banned %} data-bs-toggle="tooltip" data-bs-placement="right" title="+{{ups}} | -{{downs}}"{% endif %}style="cursor: default">{{score}}</span>
<div {% if DISABLE_DOWNVOTES %}style="display:None!important"{% endif %} tabindex="0" role="button" onclick="vote('post', '{{p.id}}', '-1')" class="post-{{p.id}}-down arrow-down mx-auto" onclick="location.href='/login?redirect={{request.path | urlencode}}';"></div>
<div {% if DISABLE_DOWNVOTES %}style="display:None!important"{% endif %} tabindex="0" role="button" onclick="vote('post', '{{p.id}}', '-1')" class="post-{{p.id}}-down arrow-down mx-auto" onclick="location.href='/login?redirect={{request.full_path | urlencode}}';"></div>
</div>
{% endif %}
@ -304,7 +304,7 @@
<span tabindex="0" role="button" onclick="vote('post-mobile', '{{p.id}}', '1')" class="post-mobile-{{p.id}}-up mx-0 pr-1 arrow-up upvote-button post-{{p.id}}-up {% if voted==1 %}active{% endif %}">
</span>
{% else %}
<span tabindex="0" class="arrow-{{p.id}}-mobile-up mx-0 pr-1 arrow-mobile-up" onclick="location.href='/login?redirect={{request.path | urlencode}}';">
<span tabindex="0" class="arrow-{{p.id}}-mobile-up mx-0 pr-1 arrow-mobile-up" onclick="location.href='/login?redirect={{request.full_path | urlencode}}';">
<i class="fas fa-arrow-alt-up mx-0" aria-hidden="true"></i>
</span>
{% endif %}
@ -314,7 +314,7 @@
{% if v %}
<span {% if DISABLE_DOWNVOTES %}style="display:None!important"{% endif %} tabindex="0" role="button" onclick="vote('post-mobile', '{{p.id}}', '-1')" class="post-mobile-{{p.id}}-down mx-0 pl-1 my-0 arrow-down downvote-button post-{{p.id}}-down {% if voted==-1 %}active{% endif %}"></span>
{% else %}
<span {% if DISABLE_DOWNVOTES %}style="display:None!important"{% endif %} tabindex="0" class="arrow-{{p.id}}-mobile-down arrow-mobile-down mx-0 pl-1 my-0" onclick="location.href='/login?redirect={{request.path | urlencode}}';">
<span {% if DISABLE_DOWNVOTES %}style="display:None!important"{% endif %} tabindex="0" class="arrow-{{p.id}}-mobile-down arrow-mobile-down mx-0 pl-1 my-0" onclick="location.href='/login?redirect={{request.full_path | urlencode}}';">
<i class="fas fa-arrow-alt-down mx-0" aria-hidden="true"></i>
</span>
{% endif %}
@ -387,7 +387,7 @@
</div>
{% else %}
<div class="comment-write mb-3">
<textarea autocomplete="off" maxlength="10000" class="comment-box form-control rounded" name="body" aria-label="With textarea" placeholder="Add your comment..." rows="3" onclick="location.href='/login?redirect={{request.path | urlencode}}';"></textarea>
<textarea autocomplete="off" maxlength="10000" class="comment-box form-control rounded" name="body" aria-label="With textarea" placeholder="Add your comment..." rows="3" onclick="location.href='/login?redirect={{request.full_path | urlencode}}';"></textarea>
</div>
<div class="card border-0 mt-4">
@ -395,8 +395,8 @@
<h5 class="card-title">Jump in the discussion.</h5>
<p class="card-text">No email address required.</p>
<div>
<a href="/signup?redirect={{request.path | urlencode}}" class="btn btn-primary">Sign up</a>
<a href="/login?redirect={{request.path | urlencode}}" class="btn btn-link text-muted">Sign in</a>
<a href="/signup?redirect={{request.full_path | urlencode}}" class="btn btn-primary">Sign up</a>
<a href="/login?redirect={{request.full_path | urlencode}}" class="btn btn-link text-muted">Sign in</a>
</div>
</div>
</div>
@ -456,7 +456,7 @@
{% if v %}
<p class="text-muted">This comment section is a ghost town...</p>
{% else %}
<p class="text-muted">This comment section is a ghost town. <a href="/login?redirect={{request.path | urlencode}}">Sign in</a></p>
<p class="text-muted">This comment section is a ghost town. <a href="/login?redirect={{request.full_path | urlencode}}">Sign in</a></p>
{% endif %}
</div>
</div>

View File

@ -65,11 +65,11 @@
{% else %}
<div tabindex="0" role="button" onclick="vote('post', '{{p.id}}', '1')" class="post-{{p.id}}-up mx-auto arrow-up" onclick="location.href='/login?redirect={{request.path | urlencode}}';"></div>
<div tabindex="0" role="button" onclick="vote('post', '{{p.id}}', '1')" class="post-{{p.id}}-up mx-auto arrow-up" onclick="location.href='/login?redirect={{request.full_path | urlencode}}';"></div>
<span class="post-{{p.id}}-score-none score{% if p.controversial %} controversial{% endif %}"{% if not p.is_banned %} data-bs-toggle="tooltip" data-bs-placement="right" title="+{{ups}} | -{{downs}}"{% endif %}style="cursor: default">{{score}}</span>
<div {% if DISABLE_DOWNVOTES %}style="display:None!important"{% endif %} tabindex="0" role="button" onclick="vote('post', '{{p.id}}', '-1')" class="post-{{p.id}}-down text-muted mx-auto arrow-down" onclick="location.href='/login?redirect={{request.path | urlencode}}';"></div>
<div {% if DISABLE_DOWNVOTES %}style="display:None!important"{% endif %} tabindex="0" role="button" onclick="vote('post', '{{p.id}}', '-1')" class="post-{{p.id}}-down text-muted mx-auto arrow-down" onclick="location.href='/login?redirect={{request.full_path | urlencode}}';"></div>
{% endif %}
@ -188,13 +188,13 @@
</li>
{% else %}
<li id="voting-{{p.id}}-mobile" class="voting list-inline-item d-md-none">
<span tabindex="0" class="arrow-{{p.id}}-mobile-up mx-0 pr-1 arrow-mobile-up" onclick="location.href='/login?redirect={{request.path | urlencode}}';">
<span tabindex="0" class="arrow-{{p.id}}-mobile-up mx-0 pr-1 arrow-mobile-up" onclick="location.href='/login?redirect={{request.full_path | urlencode}}';">
<i class="fas fa-arrow-alt-up mx-0" aria-hidden="true"></i>
</span>
<span class="post-mobile-score-{{p.id}} score{% if p.controversial %} controversial{% endif %}"{% if not p.is_banned %} data-bs-toggle="tooltip" data-bs-placement="top" title="+{{ups}} | -{{downs}}"{% endif %}style="cursor: default">{{score}}</span>
<span tabindex="0" class="arrow-{{p.id}}-mobile-down arrow-mobile-down mx-0 pl-1 my-0" onclick="location.href='/login?redirect={{request.path | urlencode}}';">
<span tabindex="0" class="arrow-{{p.id}}-mobile-down arrow-mobile-down mx-0 pl-1 my-0" onclick="location.href='/login?redirect={{request.full_path | urlencode}}';">
<i class="fas fa-arrow-alt-down mx-0" aria-hidden="true"></i>
</span>
</li>

View File

@ -23,7 +23,7 @@
<div id="button-unsub-{{u.id}}" style="z-index: 2" class="{% if not u.has_follower(v) %} d-none{% endif %}"><button type="button" class="btn btn-secondary" onclick="postToastSwitch(this,'/unfollow/{{u.username}}','button-sub-{{u.id}}','button-unsub-{{u.id}}','d-none')">Unfollow</button></div>
{% endif %}
{% else %}
<div id="button-sub-{{u.id}}" style="z-index: 2"><a class="btn btn-primary" href="/signup?redirect={{request.path | urlencode}}">Follow</a></div>
<div id="button-sub-{{u.id}}" style="z-index: 2"><a class="btn btn-primary" href="/signup?redirect={{request.full_path | urlencode}}">Follow</a></div>
{% endif %}
</div>