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

Ampersand is rendered as & in preview (double HTML escaping) #3840

Closed
1 task done
j0hannes opened this issue Mar 12, 2018 · 9 comments
Closed
1 task done

Ampersand is rendered as & in preview (double HTML escaping) #3840

j0hannes opened this issue Mar 12, 2018 · 9 comments
Labels
entry-preview good first issue An issue intended for project-newcomers. Varies in difficulty.

Comments

@j0hannes
Copy link

JabRef version 4.2-dev

Steps to reproduce:

  1. look at some entry with ampersand, e.g. Morgan & Claypool
@j0hannes
Copy link
Author

j0hannes commented Mar 12, 2018

it's actually the same for any HTML entity: &amp;eacute <- note the missing semicolon

@psychelzh
Copy link
Contributor

psychelzh commented Mar 14, 2018

Hi, @j0hannes Actually, &amp; is in the HTML conversion table:

{"38", "amp", "\\&"}, // ampersand, U+0026 ISOnum

Would you like to give a simple sample of raw .bib text for us to test?

@j0hannes
Copy link
Author

j0hannes commented Mar 14, 2018

@Misc{b1111,
  author = {b, a},
  title  = {c \& d},
  year   = {1111},
}

renders as a b. 1111. c &amp;amp; d.

@stefan-kolb
Copy link
Member

@Misc{b1111,
  author = {b, a},
  title  = {c \& d},
  year   = {1111},
}

renders as

image

for me.

@stefan-kolb stefan-kolb added the status: waiting-for-feedback The submitter or other users need to provide more information about the issue label Mar 14, 2018
@j0hannes
Copy link
Author

j0hannes commented Mar 14, 2018

the error happens when you go to "Next preview layout":
image

when you copy the entry, you get

<html><head></head><body><div class="csl-entry">a b. 1111. c &amp;amp; d.</div>
</body></html>

I added another preview layout (African Zoology) and I get a similar error:

<html><head></head><body><div class="csl-entry">B,  A. 1111. c &amp;amp; d.</div>
</body></html>

@tobiasdiez
Copy link
Member

This issue probably only happens for CSL-previews and not for the layout based ones.
I guess there is a problem with our latex to html formatter.

@tobiasdiez tobiasdiez added good first issue An issue intended for project-newcomers. Varies in difficulty. and removed status: waiting-for-feedback The submitter or other users need to provide more information about the issue labels Dec 25, 2019
@KarlMagnusLarsson
Copy link

This is the same thing as I reported, post closed, in Entry preview: Umlaut and ring diacritic not rendered correctly when APA and IEEE preview layout is selected #5779, just like @tobiasdiez point out.

@jjsfernandez jjsfernandez mentioned this issue Dec 26, 2019
5 tasks
@tobiasdiez
Copy link
Member

Thanks to @JosejeSinohui this should be fixed in the latest development version. Could you please check the build from http://builds.jabref.org/master/. Thanks! Please remember to make a backup of your library before trying-out this version.

@geoffcallender
Copy link

I've spent a couple of hours on this and my findings are very unclear...

I can no longer recreate the issue.

If the Vimeo video has not been pre-loaded, when you tap on it you'll a button for sound (note that we are using muted=1) and another for full screen. If you tap either, then the next bit of speech will cause the video to pause. This can be prevented by setting autopause=0 (by hand, through the inspector). But the odd thing is that if you debug the code, it looks like autopause=0 should already have been in the URL.

VideoUtil.buildVimeoOptions has been returning strings with "&" in them. The manual Vimeo videos end up with "&amp;" in the URL, which might be causing issues. Much better is to use just "&" in the string, then return it to the TML with new URL(string), which will encode it as needed. However, VideoUtil.toEmbeddedURLWithOptions has 9 callers. I will have to return to this issue when I have time to change and test them all.

But... there is no guarantee that the above will solve the issue, because I can't recreate it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
entry-preview good first issue An issue intended for project-newcomers. Varies in difficulty.
Projects
None yet
Development

No branches or pull requests

6 participants