Ticket #860 (closed defect: wontfix)

Opened 3 years ago

Last modified 2 years ago

core - Dom.js getPlainText() crushes newlines

Reported by: mahemoff Owned by: JeremyRuston
Priority: minor Milestone: 2.6
Component: core Version:
Severity: low Keywords:
Cc:

Description (last modified by FND) (diff)

getPlainText() (which is used by wikifyPlainText) makes newlines disappear.

abc
def

becomes "abcdef" whereas the desired behaviour in most cases would be "abc def".

The implementation delegates to the DOM's innerText/textContent. I propose that prior to that delegation, it replaces any [ \n\t]+ pattern with a single space.

Change History

Changed 3 years ago by MartinBudden

  • milestone set to 2.5.1

Changed 3 years ago by FND

  • severity changed from undefined to low
  • description modified (diff)
  • milestone changed from 2.5.1 to 2.5.2

Changed 3 years ago by FND

  • milestone changed from 2.5.3 to 2.5.4

Changed 2 years ago by FND

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

Unfortunately, changing this behavior now might lead to unexpected behavior - so wontfix for the sake of backwards compatibility.

Note: See TracTickets for help on using tickets.