Opened 10 years ago
Last modified 14 months ago
#12054 new defect
Normalize newline of wiki text to CRLF on initenv, saving wiki and fetching wiki
Reported by: | Jun Omae | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | next-stable-1.6.x |
Component: | wiki system | Version: | |
Severity: | normal | Keywords: | |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
Currently, Trac creates default pages with LF as newline on initenv. However, browsers send request with CRLFs for newline in textarea elements. Therefore, Trac creates a new version of the page even if the page is saved without changes.
>>> v1 = WikiPage(env, 'WikiStart', 1) >>> v2 = WikiPage(env, 'WikiStart', 2) >>> v1.text[:40] u"= Welcome to Trac 1.0.5 =\n\nTrac is a '''" >>> v2.text[:40] u"= Welcome to Trac 1.0.5 =\r\n\r\nTrac is a '" >>> v1.text.replace('\n', '\r\n') == v2.text True
I think we should normalize newlines in text of wiki page on initenv, saving wiki and fetching wiki.
Attachments (0)
Change History (5)
comment:1 by , 10 years ago
comment:2 by , 9 years ago
Summary: | Normalize newline of wiki text to CRLF on initenv, saving wiki and fetchting wiki → Normalize newline of wiki text to CRLF on initenv, saving wiki and fetching wiki |
---|
comment:3 by , 8 years ago
Milestone: | next-stable-1.0.x → next-stable-1.2.x |
---|
Moved ticket assigned to next-stable-1.0.x since maintenance of 1.0.x is coming to a close. Please move the ticket back if it's critical to fix on 1.0.x.
comment:4 by , 5 years ago
Milestone: | next-stable-1.2.x → next-stable-1.4.x |
---|
The same issue occurs when ticket comment is added via CommitTicketUpdater and it's edited.