Closed code-consensus closed 1 week ago
The issue should be resolved in commit f35bf24 by adding a space before the <br>
tag, although it is essentially an alteration to the message.
To (if) any forensic investigators: please use the god damn paid tools like EnCase and FTK or whatever.
I tested this myself, and seems to work perfectly now. As for the message being slightly "altered", that is a small price to pay to have the message show up correctly!
The issue should be resolved in commit f35bf24 by adding a space before the
<br>
tag, although it is essentially an alteration to the message.To (if) any forensic investigators: please use the god damn paid tools like EnCase and FTK or whatever.
Released in 0.10.5.
Describe the bug The program makes URLs clickable as per #69 . However, there is a bug of sorts involving messages that involve new-lines inside the message, where the link includes text and
<br>
elements.To Reproduce Steps to reproduce the behavior:
With a message like: "https://example.com/webpage.html Hey check out this link"
the generated HTML will look like:
<a href="https://example.com/webpage.html<br>Hey" target="_blank">
The same if there are two-new lines, you would get html like
<a href="https://example.com/webpage.html<br><br>Hey">
Workaround The issue is caused by the
<br>
insertions in theif "\r\n" in msg:
andif "\n" in msg:
sections in android_handler.py (line 446 and 461).If you comment out those code segments to NOT add
<br>
, then the URLs are handled correctly (e.g.<a href="https://example.com/webpage.html">
). However, that is at the expense of not creating a new line.There must be some incompatibility with the addition of the
<br>
elements to the message and the subsequent "urlification" of the message in create_html() (the urlize() function in whatsapp.html?)