Closed Bug 1019434 Opened 8 years ago Closed 8 years ago is truncating text content


(Release Engineering :: General, defect)

Not set


(Not tracked)



(Reporter: pmoore, Assigned: pmoore)



(1 file)

When we run in the tools repo, the wiki page gets updated by script

Unfortunately, if the text on the page contains an '&', this ampersand and anything afterwards gets removed from the page.

For example, see:

This page shows the diff between before and after has posted to the Maintenance wiki page.

Here you see on the left side (prior to update):
* {{Bug|989533}} - Enable e10s on m-c, m-i & try. r=aki <- bbot-cfgs

But on the right side it stops at (after update has been performed):
* {{Bug|989533}} - Enable e10s on m-c, m-i 

As you see, it has stopped at the ampersand, and additionally, *all lines* after this line have disappeared on the right side (the updated post).

This is because we are not url-escaping the text, and in the http post, the & is used to separate variables, e.g. text=123&apply=now would post two variables, "text" and "apply" (as an example). When we url-escape the text content, it should treat the full text as content for the page.
I've tested this patch, and successfully posted without losing content after the '&'. See:

As you can see, it has added the new lines, and this time, not truncated the former content.
Attachment #8433138 - Flags: review?(coop)
Attachment #8433138 - Flags: review?(coop) → review+
Comment on attachment 8433138 [details] [diff] [review]
Patch for in tools repo
Attachment #8433138 - Flags: checked-in+
This has been working fine since landing the patch, so I'm closing the bug now.
Closed: 8 years ago
Resolution: --- → FIXED
Component: Tools → General
You need to log in before you can comment on or make changes to this bug.