Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dasht-server is inserting encoded apostrophes that (neo)vim-dasht can't decode #25

Closed
snoblenet opened this issue Aug 29, 2017 · 7 comments

Comments

@snoblenet
Copy link

dasht-server is converting single straight quotes into encoded apostrophes:

https://github.com/sunaku/dasht/blob/master/bin/dasht-server-http#L57

'Vanilla' dasht in the shell knows how to handle these. For example, you can get:

xdescribe                            Jasmine method
Describing Hooks                       Mocha guide

However, vim-dasht on Neovim does not. Instead, you get:

'xdescribe'                            Jasmine method
'Describing Hooks'                       Mocha guide

I can think of several ways of fixing this, but I'm raising the issue on this repo (vs on vim-dasht) as the simplest solution surely would be to just not encode those straight single quotes.

Thoughts?

@snoblenet
Copy link
Author

BTW this behaviour has stopped. I am not sure why. Feel free to close this issue if it suits.

@snoblenet
Copy link
Author

I tell a lie. The problem is still there. It's just there is no longer an apostrophe at the start and end of each entry. The apostrophes in the middle of entries are still escaped in this way however.

@sunaku
Copy link
Owner

sunaku commented Sep 2, 2017

Thanks for your report. Unfortunately, I'm unable to reproduce it on my system. 😥

I can at least isolate the issue to the rendering of XML entities, which is performed by the w3m browser.

Which version of w3m do you have? On my system, I have:

$ w3m -V
w3m version w3m/0.5.3+git20170102, options lang=en,m17n,image,color,ansi-color,menu,cookie,ssl,ssl-verify,external-uri-loader,nntp,ipv6,alarm,mark

@snoblenet
Copy link
Author

Thanks @sunaku. I have:

$ w3m -V
w3m version w3m/0.5.3, options lang=en,m17n,color,ansi-color,mouse,menu,cookie,ssl,ssl-verify,external-uri-loader,w3mmailer,nntp,ipv6,alarm,mark

@sunaku
Copy link
Owner

sunaku commented Jul 21, 2018

Good news: I'm finally able to reproduce this issue now, using w3m from Debian instead of Void Linux. 🎉

$ cat /etc/issue
Debian GNU/Linux buster/sid \n \l

$ w3m -V
w3m version w3m/0.5.3+git20180125, options lang=en,m17n,image,color,ansi-color,mouse,gpm,menu,cookie,ssl,ssl-verify,external-uri-loader,w3mmailer,nntp,gopher,ipv6,alarm,mark,migemo

@sunaku sunaku added the bug label Jul 22, 2018
@sunaku
Copy link
Owner

sunaku commented Jul 22, 2018

Looks like this is an issue with w3m itself: I'm not able to reproduce it with Lynx or Chrome browsers:

screenshot

sunaku added a commit that referenced this issue Jul 22, 2018
See https://stackoverflow.com/a/2083770 which refers to this spec:

  C.16. The Named Character Reference '
        https://www.w3.org/TR/xhtml1/#C_16

  The named character reference ' (the apostrophe, U+0027) was
  introduced in XML 1.0 but does not appear in HTML. Authors should
  therefore use ' instead of ' to work as expected in HTML
  4 user agents.
sunaku added a commit that referenced this issue Jul 22, 2018
See https://stackoverflow.com/a/2083770 which refers to this spec:

> C.16. The Named Character Reference '
>       https://www.w3.org/TR/xhtml1/#C_16
>
> The named character reference ' (the apostrophe, U+0027) was
> introduced in XML 1.0 but does not appear in HTML. Authors should
> therefore use ' instead of ' to work as expected in HTML
> 4 user agents.
@sunaku
Copy link
Owner

sunaku commented Jul 22, 2018

Fixed now in commit ea5025b 💖 Thanks for reporting this bug. 👍

@sunaku sunaku closed this as completed Jul 22, 2018
sunaku added a commit that referenced this issue Jul 25, 2018
See https://stackoverflow.com/a/2083770 which refers to this spec:

  C.16. The Named Character Reference '
        https://www.w3.org/TR/xhtml1/#C_16

  The named character reference ' (the apostrophe, U+0027) was
  introduced in XML 1.0 but does not appear in HTML. Authors should
  therefore use ' instead of ' to work as expected in HTML
  4 user agents.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants