fix(feed): escape self link URLs

This commit is contained in:
Lain Soykaf 2026-07-24 20:11:19 +04:00
commit d0c8ca92a5
No known key found for this signature in database
2 changed files with 17 additions and 1 deletions

View file

@ -138,6 +138,18 @@ defmodule Pleroma.Web.Feed.UserControllerTest do
assert activity_titles == [~c"2hu & as"]
end
test "escapes query parameters in feed self links", %{conn: conn, user: user} do
for format <- ~w[atom rss] do
response =
conn
|> get("/users/#{user.nickname}/feed.#{format}?first=one&second=two")
|> response(200)
assert response =~ "first=one&amp;second=two"
refute response =~ "first=one&second=two"
end
end
test "returns 404 for a missing feed", %{conn: conn} do
conn =
conn