cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
ben_chapman
New Member

Narrow no break spaces don't render properly in Safari

Jump to solution

Canvas developers,

We are seeing this very odd behavior in the way that Safari renders some Canvas pages. In just a few documents, the HTML source shows unicode character U202F (narrow no break space). Safari renders it as a zero-length space and so you get the effect shown the first screenshot below. Chrome treats them as half-spaces, and so they render, but they look a bit odd.

I've created a search script that uses the API to find occurences of the half space character, but I'm trying to figure out why they are in the file in the first place.

Our instructors use Word to create files that are then cut and pasted into Canvas. Canvas does not appear to do very much (any?) clean-up of cut-and-pasted Word data. Do you have any advice for workflows that would minimize this or similar issues?

Thanks,

Ben

P.S. I'm happy to share the code for the Python script that I wrote that checks for 18 different kinds of Unicode spaces. There's a nice document that shows the various spaces here: Unicode spaces .

Narrow no break spaces in Safari:

Screenshot of Safari Browser capture

Narrow no break spaces in Chrome:

Image of screenshot captured from Chrome browser.

1 Solution
kenneth_rogers
Instructure
Instructure

Hi there,  @ben_chapman !

First thing, I'm going to share this with both https://community.canvaslms.com/groups/canvas-developers?sr=search&searchId=20440431-e167-46d9-9b93-...‌ and https://community.canvaslms.com/groups/admins?sr=search&searchId=7d91c6b8-6285-4347-b9b4-9e38cbf1c21...‌ for their input. Hopefully the extra sets of eyes will help you out.

Second, you asked how to mitigate the extra Word code that comes across when you copy/paste from there. For as long as I've worked with an LMS (or really any web based RCE), I've told people to add a step in between which is pasting to notepad which will strip the code, and then copy/paste from notepad over to the RCE. You will have to reformat if you have headers, bold text, etc...but in the end it's worth it.

Scary story - I had a faculty member completely lock down and break a course once because they refused to stop copying/pasting from Word! (Don't worry - not Canvas, a different LMS and this was yearsss ago!)

View solution in original post

1 Reply
kenneth_rogers
Instructure
Instructure

Hi there,  @ben_chapman !

First thing, I'm going to share this with both https://community.canvaslms.com/groups/canvas-developers?sr=search&searchId=20440431-e167-46d9-9b93-...‌ and https://community.canvaslms.com/groups/admins?sr=search&searchId=7d91c6b8-6285-4347-b9b4-9e38cbf1c21...‌ for their input. Hopefully the extra sets of eyes will help you out.

Second, you asked how to mitigate the extra Word code that comes across when you copy/paste from there. For as long as I've worked with an LMS (or really any web based RCE), I've told people to add a step in between which is pasting to notepad which will strip the code, and then copy/paste from notepad over to the RCE. You will have to reformat if you have headers, bold text, etc...but in the end it's worth it.

Scary story - I had a faculty member completely lock down and break a course once because they refused to stop copying/pasting from Word! (Don't worry - not Canvas, a different LMS and this was yearsss ago!)