XMLWordPrintable

Details

    • Improvement
    • Resolution: Unresolved
    • Minor
    • None
    • None
    • None
    • Trivial

    Description

      When creating a new page and entering the title, especially if by pasting in from an external source, it is easy to inadvertently have extra whiltespace characters at the beginning or end (and especially, to not notice those at the end).  This causes unwanted extra whitespace in URLs and can be nontrivial to correct later. 

      The proposed improvement is to apply the trim() operation (removing leading and trailing whitespace) to the title of a page as part of the page saving process.

      By nontrivial to correct later, this means:

      -Choosing to Edit the page and editing the title to remove the space, does not change the URL, thus failing to satisfy the edit goal.

      -After removing the space in the title via edit, attempting the Move/Rename function (without creating an automatic redirect) produces "Error: A page with the given name (WebHome) already exists. Please provide a different name."

      Returning to the original page and using the Rollback function to restore the extra space, then attempting to use move/rename (again without creating an automatic redirect), works to move the page, but the version with the extra space at the end remains in the Navigation panel. Clicking on the version with the hidden space at the end opens the expected list of children in Navigation (as does clicking the correct, manually trimmed version), but shows "The requested page could not be found" in the main panel (unlike the correct version which shows content).  The children pages of the one with the extra space also remain live, despite having selected options to Preserve Children and Update Links when doing the rename to remove that extra space. 

      A simple trim() on saving the page title could make things easier.

      For backwards compatibility, it may be best to have this only affect the page title on save, without modifying the URLs of pages in existing wikis, while new pages in those wikis would benefit from the auto-trim, and previously created pages would only have the trim applied to the display title, after the first edit following this update.

      Attachments

        Activity

          People

            AyushShrivastava Ayush Shrivastava
            BT Btowne
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: