Commit graph

2 commits

Author SHA1 Message Date
Edward Loveall
fb51270f87
Fix article ID parsing bug
Since the article ID regular expression wasn't anchored to the end of
the URL, it would grab characters after a / or - that were hex
characters. For example /@user/bacon-123abc would just grab `bac`. Not
great.

This anchors the ID at the end of the string so that it will be more
likely to catch IDs.
2022-02-13 21:07:50 -05:00
Edward Loveall
24d3ab9ab3
Better article ID parsing
A new ArticleIdParser class takes in an HTTP::Request object and parses
the article ID from it. It intentinoally fails on tag, user, and search
pages and attempts to only catch articles.
2022-02-13 10:10:46 -05:00