Encode generated template URLs using www_form format

This commit is contained in:
Claudio Ortolina
2025-07-15 11:04:53 +01:00
parent 66651933a5
commit c8fc630bed
+3 -3
View File
@@ -71,8 +71,8 @@ defmodule MusicLibrary.OnlineStoreTemplates do
format_string = Atom.to_string(record.format)
template.url_template
|> String.replace("{artist}", URI.encode(artists_string))
|> String.replace("{title}", URI.encode(record.title))
|> String.replace("{format}", URI.encode(format_string))
|> String.replace("{artist}", URI.encode_www_form(artists_string))
|> String.replace("{title}", URI.encode_www_form(record.title))
|> String.replace("{format}", URI.encode_www_form(format_string))
end
end