Opened 9 years ago

Closed 23 months ago

#2980 closed defect (fixed)

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: Blocking:
Patch: yes

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 (4)

imgbug.png download (34.4 KB) - added by trapamoosch 9 years ago.
bug2980.html download (607 bytes) - added by chowette 6 years ago.
sample to reproduce bug
black.jpg download (734 bytes) - added by chowette 6 years ago.
sample to reproduce bug
html_space_around_img__fix_2980.patch download (1.5 KB) - added by gevorg 23 months ago.
This should fix it.

Download all attachments as: .zip

Change History (8)

Changed 9 years ago by trapamoosch

Changed 6 years ago by chowette

sample to reproduce bug

Changed 6 years ago by chowette

sample to reproduce bug

comment:1 follow-up: Changed 2 years ago by oneeyeman

  • Resolution set to fixed
  • Status changed from new to closed

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

comment:2 in reply to: ↑ 1 Changed 2 years ago by chowette

  • Resolution fixed deleted
  • Status changed from closed to reopened

Replying to oneeyeman:

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

Did you really intend to close it ?

Changed 23 months ago by gevorg

This should fix it.

comment:3 Changed 23 months ago by gevorg

  • Patch set

comment:4 Changed 23 months ago by VZ

  • Resolution set to fixed
  • Status changed from reopened to closed

(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.