Closed Bug 502009 Opened 16 years ago Closed 16 years ago

Strip surrounding whitespace from (trim) KB article titles

Categories

(support.mozilla.org :: Knowledge Base Software, task)

x86
Linux
task
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 514820

People

(Reporter: cww, Assigned: paulc)

References

Details

Attachments

(1 file, 1 obsolete file)

We have a few copies of KB articles with just whitespace around the correct titles: Eg: (space)Chrome registration failed(space), Firefox n'imprime pas correctement les pages(space). This is confusing at best. We should trim whitespace characters either when creating pages/translations or when saving them
Assignee: nobody → paul.craciunoiu
Target Milestone: --- → 1.3
Attached patch patch, v1 (obsolete) — Splinter Review
This updates the create_page function for tikilib.php Cheng, can you file an SQL patch to follow for updating current articles?
Attachment #386565 - Flags: review?(smirkingsisyphus)
Attachment #386565 - Flags: review?(laura)
I think we probably want to do this manually since we shouldn't just overwrite existing articles with their duplicates. Attaching a list of all articles with surrounding whitespace.
Attachment #386565 - Flags: review?(laura) → review-
Comment on attachment 386565 [details] [diff] [review] patch, v1 trim() is not mb safe.
(In reply to comment #3) > (From update of attachment 386565 [details] [diff] [review]) > trim() is not mb safe. Is there a good approach for this? Would regex be mb safe for replacing spaces at the beginning and end of string?
(In reply to comment #4) > Is there a good approach for this? Would regex be mb safe for replacing spaces > at the beginning and end of string? Nevermind. As part of bug 501880 (newsearch rewrite), I have added a multibyte library file, including a multibyte version of trim (mb_trim), which will take care of this bug. Pushing to 1.4 and adding dependence.
Depends on: 501880
Target Milestone: 1.3 → 1.4
Attachment #386565 - Attachment is obsolete: true
Attachment #386565 - Flags: review?(smirkingsisyphus)
Depends on: 508303
Since this is in tikilib, let's try to fix this on a larger scale, as part of bug 514820.
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → DUPLICATE
No longer depends on: 501880
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: