Ticket #2980 (closed defect: fixed)

Opened 7 years ago

Last modified 8 months ago

Space around <img> tag are badly handled in wxHtmlWindow

Reported by: trapamoosch Owned by:
Priority: normal Milestone:
Component: wxHtml Version:
Keywords: Cc: trapamoosch, vaclavslavik
Blocked By: Patch: yes
Blocking:

Description

Assuming <img> is a valid html tag, if you write :
"something <img> something" ang give this html code to
a wxHtmlWindow, the first space (just before <img> is
correctly handled but the second is stripped whereas it
should also appear on the render.
The behavior seems to change also if there is text or
not before the img.
Look at the attached picture to see some examples.

Attachments

imgbug.png download (34.4 KB) - added by trapamoosch 7 years ago.
bug2980.html download (0.6 KB) - added by chowette 5 years ago.
sample to reproduce bug
black.jpg download (0.7 KB) - added by chowette 5 years ago.
sample to reproduce bug
html_space_around_img__fix_2980.patch download (1.5 KB) - added by gevorg 8 months ago.
This should fix it.

Change History

Changed 7 years ago by trapamoosch

Changed 5 years ago by chowette

sample to reproduce bug

Changed 5 years ago by chowette

sample to reproduce bug

follow-up: ↓ 2   Changed 15 months ago by oneeyeman

  • status changed from new to closed
  • resolution set to fixed

This bug is still present confirmed on the system configured as in 2976.

in reply to: ↑ 1   Changed 9 months ago by chowette

  • status changed from closed to reopened
  • resolution deleted

Replying to oneeyeman:

This bug is still present confirmed on the system configured as in 2976.

Did you really intend to close it ?

Changed 8 months ago by gevorg

This should fix it.

  Changed 8 months ago by gevorg

  • patch set

  Changed 8 months ago by VZ

  • status changed from reopened to closed
  • resolution set to fixed

(In [72588]) Fix handling of spaces after <img> tag in wxHTML.

Don't collapse the spaces following this tag with the ones preceding it.

See #14557.

Closes #2980.

Note: See TracTickets for help on using tickets.