Opened 14 years ago

Closed 14 years ago

#523 closed defect (fixed)

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

comment:1 Changed 14 years ago by niko

why is it replaced anyway?

comment:2 Changed 14 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.

comment:3 Changed 14 years ago by niko

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

commited in changeset:342

comment:4 Changed 14 years ago by xinha.20.artus83@…

  • Resolution fixed deleted
  • Status changed from closed to reopened

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.

comment:5 Changed 14 years ago by ray

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

comment:6 Changed 14 years ago by gogo

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

Fixed - changeset:393

Note: See TracTickets for help on using tickets.