def delete(request, pk):
    like = get_object_or_404(CommentLike, pk=pk, user=request.user)

    if is_post(request):
        like.delete()
        like.comment.decrease_likes_count()

        if is_ajax(request):
            url = reverse(
                'spirit:comment:like:create',
                kwargs={'comment_id': like.comment.pk})
            return json_response({'url_create': url, })

        return redirect(request.POST.get('next', like.comment.get_absolute_url()))

    return render(
        request=request,
        template_name='spirit/comment/like/delete.html',
        context={'like': like})
A web application accepts a user-controlled input that specifies a link to an external site, and uses that link in a Redirect. This simplifies phishing attacks.