Builditluc / wiki-tui

A simple and easy to use Wikipedia Text User Interface
https://wiki-tui.net/
MIT License
405 stars 14 forks source link

[BUG] URL encoded links yield error when open them from the page #179

Closed non-descriptive closed 1 year ago

non-descriptive commented 1 year ago

General Information Version: 0.7.0 Installation Method: cargo Operating System: any Backend (If changed during install): default

Describe the bug URLs made of ASCII characters and for languages, that lies outside of the ASCII range (like Cyrilic languges, Japaneese or Chineese, Arabic etc) UTF text encoded as escape codes. For some reason this kindof links fails to concatenate with the main url and yield error about empty title of the page. Also when redirect message pop-up appears it displays URL encoded mess like (%D0%A0%D0%B0%D1%81%D1%82%D0%B8%D1%82%D0%B5%D0%BB%D1%8C%D0%BD%D0%BE%D0%B5_%D0%BC%D0%BE%D0%BB%D0%BE%D0%BA%D0%BE). We can decode it and display readable text to the user.

To Reproduce Steps to reproduce the behavior:

  1. Switch search language to esperanto
  2. Search "Censerey" and open first result.
  3. Navigate to the third link on the page " Côte-d'Or"
  4. Attempt to go to the page
  5. See encoded link image
  6. Confirm opening
  7. See error image

Expected behavior Page should be opened like if we searched. Search results doesn't share faulty behaviour when searching and opening non-ascii links.

Additional context Log : wiki-tui.log

Checklist

Builditluc commented 1 year ago

Thank you for your bug report @non-descriptive! I've already reproduced it and am now trying to get to the root of the issue

Builditluc commented 1 year ago

Good news! The issue should be fixed in the fix-url-decoding branch. Could you maybe check if it fixed the issue for you as well?

non-descriptive commented 1 year ago

Confirm that fix is working.