Ticket #523 (closed defect: fixed)

Opened 8 years ago

Last modified 8 years ago

strike / del isn't replaced correctly in inwardHtml

Reported by: xinha.20.artus83@… Owned by: gogo
Priority: normal Milestone:
Component: Xinha Core Version:
Severity: trivial Keywords:
Cc:

Description

In both functions inwardHTML and outwardHTML <strike> is replaced by <del>. I think in the function inwardHTML it should be the other way around.

So we should replace there:

    html = html.replace(/<(\/?)strike(\s|>|\/)/ig, "<$1del$2");

with:

    html = html.replace(/<(\/?)del(\s|>|\/)/ig, "<$1strike$2");

Change History

Changed 8 years ago by niko

why is it replaced anyway?

Changed 8 years ago by xinha.20.artus83@…

I think it is done, because IE creates <del> tags, but these are not recognized by the Mozilla editor component. So Mozilla user wouldn't be able to remove a style applied by an IE user.

Changed 8 years ago by niko

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

commited in changeset:342

Changed 8 years ago by xinha.20.artus83@…

  • status changed from closed to reopened
  • resolution deleted

I was wrong, with the reason it is done. IE creates <strike> tags to. In outwardHtml the tags replaced in both IE and Mozilla, but inwardHtml replaces them only in Mozilla. This should be done consistently, since the way it is at the moment, you can't remove the strike style in IE after viewing the source.

Changed 8 years ago by ray

I think the replacement maybe because <strike> is deprecated, and anyway logical markup nowadays is prefered to optical

Changed 8 years ago by gogo

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

Fixed - changeset:393

Note: See TracTickets for help on using tickets.