Conversation
|
Thanks! |
|
I think this is actually wrong, escaping breaks for instance urls with a tilde in them. The hyperref manual says that " The special characters # and ̃ do not need to be escaped in any way.". Unfortunately, it does not say anything about other characters... |
|
@mkamensky Thanks for your comment - do you have any test cases for this? |
|
Yes, this comes from my real life example: It produces which does not compile. Thanks! |
|
@mkamensky Sorry for the long delay... I have tested this now with #, % and ~: Seems to work fine without escaping. As you mentioned, the hyperref package doesn't say much about escaping but I found this answer on StackExchange. Therefore I have changed the code to just escape the percent sign and nothing else. Seems to do what it should so far. Will be in the next release! |
Pull request #67 changed the code to use the escape() method. However, this does more than it should, breaking the URLs. By just escaping the percent sign this code should work in all cases and environments now (fingers crossed).
|
@gettalong Thanks! |
An URL such as in a
a['href']can contain URL escape codes, which all start with a%. The LaTeX-converter should escape all%to\%usingescape(), or otherwise the unescaped%will be treated like a comment in LaTeX, corrupting the file.This pull request fixes this by calling
escape()on the URL.