mpod/mPage

Trying to add a localhost URL can break the UI

Closed this issue · 2 comments

OS: Windows 10
Browser: Firefox 71.0b2
Extension version: 1.16

If you try to add a localhost URL to mPage, such as http://localhost:3000/files/feed, the left-most column will stop updating correctly when clicking between pages. It is impossibe to delete this broken feed via the UI, only by exporting, modifying the config, and reimporting could I fix it.

The console shows:

TypeError: localhost is not a valid URL. view.js:278:17
    createFaviconEl         moz-extension://5c673c99-a9a5-4bd4-8dc4-8114ea7f3d6e/scripts/view.js:278
    createWidgetHeaderEl    moz-extension://5c673c99-a9a5-4bd4-8dc4-8114ea7f3d6e/scripts/view.js:254
    createWidgetEl          moz-extension://5c673c99-a9a5-4bd4-8dc4-8114ea7f3d6e/scripts/view.js:231
    drawWidget              moz-extension://5c673c99-a9a5-4bd4-8dc4-8114ea7f3d6e/scripts/view.js:156
    processEvent            moz-extension://5c673c99-a9a5-4bd4-8dc4-8114ea7f3d6e/scripts/view.js:33
    processHandler          moz-extension://5c673c99-a9a5-4bd4-8dc4-8114ea7f3d6e/scripts/feed.js:187
    onreadystatechange      moz-extension://5c673c99-a9a5-4bd4-8dc4-8114ea7f3d6e/scripts/ajax.js:27

Maybe there could be more strict requirements on validating the URL before storing it?

mpod commented

Thanks for reporting the issue. I'll start to work on it in a week or two. If you have some ideas for other improvements please report them here.

mpod commented

Interesting bug. It's fixed.