okay NOW the pattern should be unborked

This commit is contained in:
Tangent 2019-06-28 17:33:40 -07:00
parent 0bad9154c6
commit be734d28b1

View File

@ -63,7 +63,7 @@ class extends lapis.Application
@page = tonumber(@params.page) or 1 @page = tonumber(@params.page) or 1
tag_pattern = escape_literal unescape(@params.name) tag_pattern = escape_literal unescape(@params.name)
tag_pattern = "' " .. tag_pattern\sub(2, -2) .. " '" tag_pattern = "'% " .. tag_pattern\sub(2, -2) .. " %'"
tracks = Tracks\paginated "WHERE tags LIKE #{tag_pattern} ORDER BY #{escape_identifier @order} #{@asc_desc}", per_page: 32 tracks = Tracks\paginated "WHERE tags LIKE #{tag_pattern} ORDER BY #{escape_identifier @order} #{@asc_desc}", per_page: 32
@last_page = 1 @last_page = 1
if tag = Tags\find name: unescape(@params.name) if tag = Tags\find name: unescape(@params.name)