Remove Leading, Trailing, Extra Whitespace From All Form Fields

0 Likes
(4)

If a user copy/pastes something and leaves extra whitespace (either leading, trailing, or duplicates), this can break things. All forms should have codes that checks for duplicate, trailing, or leading whitespace in an input field and removes it or ignores it before applying those changes/submitting the search query.

Examples:

  • All users: RCE hyperlink button / Insert Link popup - Pasting a URL with leading or trailing whitespace causes a broken link. It's already being detected because it's replaced with a %20, but if it's in the first or last position it should just be trimmed instead.

  • All users: User account profile fields, like name - can break LTIs like Pearson MyLab and Mastering

  • Admin and instructor: Courses search field (and course search fields in other areas, such as cross-listing) - copy/pasting a course code or name very often includes trailing whitespace. (You double-click to highlight and copy, but it scoops up any trailing whitespace as well.) This causes the search results on the Admin Courses search and Cross-listing course search to come back empty, even when there's a matching course. (Might impact course copy search too; I haven't checked.)

  • Admin: Double whitespace between names - See this idea. Admin People search breaks when looking for "Aaron Ross" if the name was input as "Aaron  Ross" (with two spaces). We rely on name search to find out if someone has a Canvas account already or needs a new one.

Screenshots (click on one to make it bigger):

link error rce.pngpearson error code.pngaaron ross name search.png

4 Comments
Stef_retired
Instructure Alumni
Instructure Alumni
Status changed to: Open
 
julian_ebeli
Community Participant

@mpfaff1 

Hi, I think you've made a really compelling case for Canvas to take this issue seriously.

 

 

mpfaff1
Community Participant

Commenting to add we just found out there's trailing whitespace in our root account name. 🤦‍

account name.png

And yes, it's causing LTI issues. I'm worried to change it now because I don't know whether it will affect the function of other LTIs. It would've been better if Canvas clipped the whitespace when we made the account.

ProductPanda
Instructure
Instructure
Status changed to: Archived
Comments from Instructure

As part of the new Ideas & Themes process, all ideas in Idea Conversations were reviewed by the Product Team. Any Idea that was associated with an identified theme was moved to the new Idea & Themes space. Any Idea that was not part of the move is being marked as Archived. This will preserve the history of the conversations while also letting Community members know that Instructure will not explore the request at this time.