Boostnote: Some URL-encoded string can't be decoded correctly

Created on 29 Sep 2017  路  5Comments  路  Source: BoostIO/Boostnote

context

URL including Japanese which is URL-encoded by EUC-JP or Shift-JIS can not be decoded correctly in view mode.

b4769cc612e073cd08679db8ee0f58bc

screenshot of Boostnote with developer tool open
https://i.gyazo.com/b3dc7697f51cb2ba8fcebbdeb4022a94.png

environment

  • windows10
  • boostnote v0.8.15

expected

I don't want to be automatically decoded.

more example

This behavior corrupts some of existing URLs.

Paste on boostnote and a web browser for comparison

http://metasearch.osdn.jp/wiki/index.php?Samba%2BLDAP%2Bsmbldap-tools%A4%C7%A5%EF%A1%BC%A5%AF%A5%B0%A5%EB%A1%BC%A5%D7%A4%CE%C5%FD%B9%E7%C7%A7%BE%DA
help wanted

Most helpful comment

Hey @kazup01, I'd love to give this one a go :)

All 5 comments

Hey @kazup01, I'd love to give this one a go :)

馃憤

Looks like the artefacts are generated by mdurl's decode function, which is used by linkify-it, which is in turn used by markdown-it to parse links that aren't wrapped in markdown's link syntax.

One way we could get around this weird behaviour would be to retroactively fix the links decoded by mdurl after markdown-it renders the editor content. I've raised #978 to address this issue.

URL including Japanese which is URL-encoded by EUC-JP or Shift-JIS can not be decoded correctly in view mode.

The issue was fixed by https://github.com/BoostIO/Boostnote/pull/816

Thanks for your contribution @aquibm !

Was this page helpful?
0 / 5 - 0 ratings

Related issues

npeeples picture npeeples  路  3Comments

DanielRamosAcosta picture DanielRamosAcosta  路  3Comments

N2ITN picture N2ITN  路  3Comments

Rokt33r picture Rokt33r  路  3Comments

Petroochio picture Petroochio  路  3Comments