Page MenuHomePhabricator

Flow: <br> changes to &lt;br&gt; if you edit
Closed, ResolvedPublic

Description

in Flow when you add <br> and save a post it is replaced with &lt;br&gt; it renders fine initially but if edited and saved again, will then render as &lt;br&gt; as plain text.


Version: unspecified
Severity: normal
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=63974
https://bugzilla.wikimedia.org/show_bug.cgi?id=65570

Details

Reference
bz65143

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 3:16 AM
bzimport set Reference to bz65143.
bzimport added a subscriber: Unknown Object (MLST).

it actually seems like other html tags do this too like <small></small>

Change 132969 had a related patch set uploaded by EBernhardson:
Don't expand templates inside topic titles

https://gerrit.wikimedia.org/r/132969

Additional comment from Jay8g: "In the page header, some symbols are escaped when you edit the header. It saves normally the first time, but further edits break it."

I recall a similar "2nd edit" bug from many months ago, but can't find it.

Change 133031 had a related patch set uploaded by EBernhardson:
Prevent double escape of content to be edited

https://gerrit.wikimedia.org/r/133031

Change 132969 merged by jenkins-bot:
Don't expand templates inside topic titles

https://gerrit.wikimedia.org/r/132969

(In reply to Quiddity from comment #3)

Additional comment from Jay8g: "In the page header, some symbols are escaped
when you edit the header. It saves normally the first time, but further
edits break it."

Your initial title edit works, after you save you see exactly what you typed with no parsing on page, watchlist, history, etc.

But
a) the title [Preview] parses some HTML, you get a line break in place of <br> and see italics in place of <em>.
b) As reported in comment #3, if you edit the title, HTML entities like < and > are incorrectly transformed into &lt; and &gt;.

  • Bug 65975 has been marked as a duplicate of this bug. ***
  • Bug 66189 has been marked as a duplicate of this bug. ***

Change 133031 merged by jenkins-bot:
Prevent double escape of content to be edited

https://gerrit.wikimedia.org/r/133031

Editing in JavaScript is fixed, but entities are still double-escaped in no-JS (bug 66227) and in placeholder text for a comment on a topic (bug 66547).

Quiddity removed a subscriber: Maryana.Dec 19 2014, 1:36 AM