#121 closed defect (fixed)
Carriage return / linefeed duplication
Reported by: | anonymous | Owned by: | daniel |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | wiki system | Version: | 0.6 |
Severity: | major | Keywords: | |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
When writing a Wiki page on Windows (in FireFox) and then re-opening it for editing (or hitting preview), the number of newlines is multiplied every time. After one edit a single empty line turns into 3. If that page is previewed, those 3 turn into 15 empty lines, which at the next save or preview turn into about 30, etc. It is a severe usability problem, but probably easy to fix.
Attachments (0)
Change History (9)
comment:1 by , 21 years ago
comment:2 by , 21 years ago
Summary: | → Carriage return / linefeed duplication |
---|
I've been unable to duplicate this. Has anyone else?
comment:3 by , 21 years ago
Resolution: | → worksforme |
---|---|
Status: | new → closed |
Marking this as worksforme for now, since we've not heard anyone else having this problem.
comment:4 by , 21 years ago
It doesn't happen on this site for example. Perhaps my installation is somewhat unique in that a) it's on Windows and b) it's not running on Apache, but on the Abyss Webserver. The browser is not the source of the problem, as IE displays the same behavior as FireFox.
comment:5 by , 21 years ago
Resolution: | worksforme |
---|---|
Status: | closed → reopened |
I've looked at the code and the CR's are multiplying every time preview is hit. Here's a solution which works for me. In wiki.py, go to the code around line 673 which says: {{{ if self.args.has_key('text'):
self.page.set_content (self.argstext)}}}
and replace all '\r' with ('\n' seems to be automatically expanded to '\r\n'):
{{{ if self.args.has_key('text'):
self.argstext = self.argstext.replace('\r', ) self.page.set_content (self.argstext)}}}
comment:6 by , 21 years ago
Version: | 0.5.2 → 0.6 |
---|
That code doesn't look quite as I intended it:
if self.args.has_key('text'): self.args['text'] = self.args['text'].replace('\r', '') self.page.set_content (self.args['text'])
Funny thing is that Page.text does not contain extra CR's, just argstext does. Perhaps something funny is going on there.
comment:7 by , 21 years ago
I have the same problem. The server is apache on windows. It doesn't matter if I use IE or FireFox…
/David
comment:8 by , 21 years ago
Owner: | changed from | to
---|---|
Status: | reopened → assigned |
I've managed to duplicate this now.. My bad for closing it early…
Thanks for reporting it, David.
/D
Sounds like we need to shave off some carriage returns or linefeeds there…
Thanks very much for the report! It's very helpful!