thoughtbot / carnival

An unobtrusive, developer-friendly way to add comments
MIT License
501 stars 30 forks source link

Comment feed contains bogus article URL due to omitting forward slashes #277

Closed jeremy-w closed 6 years ago

jeremy-w commented 9 years ago

This looks to be due to the backend storing bogus URL info provided by the on-page JS.

The Article.id field in autogen.js is initialized as this.id = location.pathname.replace(/\//g, '');. This ID gets sent up when a new comment is posted as the article URL, which is not true if the path component of the URL is something as common as /2015/05/my-post.html.