cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
stevensons
Community Contributor

What is that random block of HTML at the end of the page?

Jump to solution

First things first: this is not a critical question, but it is driving me a little bit nuts. I also haven't been successful in Googling an answer, so I wondered if anyone else has noticed this and has more knowledge than I do about it. Smiley Happy

I've seen that Canvas sometimes adds this block of HTML at the end of a given page, sometimes several times in a row. I don't know what it is or what it does, and it doesn't seem to result in anything visible:

<p><span style="text-indent: 20px; width: auto; padding: 0px 4px 0px 0px; text-align: center; font: bold 11px/20px 'Helvetica Neue',Helvetica,sans-serif; color: #ffffff; background: #bd081c  no-repeat scroll 3px 50% / 14px 14px; position: absolute; z-index: 8675309; display: none; cursor: pointer;">Save</span></p>

I have seen this occasionally happen in the Wordpress visual editor, too. What the heck is it?? WHY is it there? Mostly I just go into the HTML source and delete them (which also seems to have no apparent effect). Obviously since it doesn't appear to "do" anything, it isn't critical, but it does result in randomly long code as more and more of them appear. Another block seems to show up every time I go in to edit a page.

If someone is able to answer this question I will express my ultimate gratitude by...bestowing a badge. :smileygrin:

Tags (1)
2 Solutions

Accepted Solutions
kroeninm
Community Champion

It's probably as AnnMarie mentioned, due to what happens earlier in the page.  I looked in two of my courses for this term and neither has this code at the bottom of the page so probably due to a copy/paste from Word and Canvas trying to match your formatting.

The only thing that looks odd is that "Save".  Did you perhaps copy from another page in Canvas without being in edit view?  That will add odd code as well.  When you copy from Canvas to Canvas, be sure to be in edit mode.  

- Melanie

View solution in original post

stevensons
Community Contributor

Thanks for the input! Yes, I am used to the horrible messes that occur when you cut and paste from Word, so I can definitely rule that out. (In fact, something I love about Canvas is that it is really good at stripping that stuff out.) No--this occurs even if I have clean code that I'm cutting and pasting from the source code of another Canvas page. It is so weird. Smiley Happy

Interestingly, ishar-uw‌, now that you've made the button visible, it looks a bit like the Pinterest Save icon that shows up when I hover over a graphic. I do have a Pinterest bookmark shortcut, so I wonder if it could be interfering in some way.

View solution in original post

10 Replies
ajohnson
Community Contributor

I believe that has come from copying--possibly from Word, maybe simple from another webpage (even Canvas). Whenever you see such messy code with spans, it's almost always Word.

kroeninm
Community Champion

It's probably as AnnMarie mentioned, due to what happens earlier in the page.  I looked in two of my courses for this term and neither has this code at the bottom of the page so probably due to a copy/paste from Word and Canvas trying to match your formatting.

The only thing that looks odd is that "Save".  Did you perhaps copy from another page in Canvas without being in edit view?  That will add odd code as well.  When you copy from Canvas to Canvas, be sure to be in edit mode.  

- Melanie

View solution in original post

kona
Community Coach
Community Coach

I concur! The only time I see code like this is if I've been copying and pasting from word. 

chofer
Community Coach
Community Coach

If you're pasting text from Word into Canvas, you might want to try a site like https://html-cleaner.com/ to see if it will clean up some of the code for you first.  Then, paste in the cleaned-up code to Canvas.  I've not done this myself, but this was a site that I found that looked like it would help you get rid of artifacts that aren't needed in your Canvas pages.

laurakgibbs
Community Champion

I make sure to teach my students about Paste-as-Plain-Text (or the equivalent, depending on what browser they are using), and also about the power of the Tx button which you can find (or the equivalent) in most HTML editors these days. My students are often copying-and-pasting from Word (even though I implore them not to...), and that means they often need to strip out extra code, esp. style code, that will mess up their blogs big time. 🙂

Shar
Community Champion

That code most definitely is from some other page, probably not Canvas or Word. It's an invisible save button alright, I made it appear by setting display: auto.

random save button

It doesn't have any functionality, just a cosmetic thing that isn't even displayed. And you've done the right thing in deleting it from your pages. Smiley Happy

Cheers - Shar

stevensons
Community Contributor

Thanks for the input! Yes, I am used to the horrible messes that occur when you cut and paste from Word, so I can definitely rule that out. (In fact, something I love about Canvas is that it is really good at stripping that stuff out.) No--this occurs even if I have clean code that I'm cutting and pasting from the source code of another Canvas page. It is so weird. Smiley Happy

Interestingly, ishar-uw‌, now that you've made the button visible, it looks a bit like the Pinterest Save icon that shows up when I hover over a graphic. I do have a Pinterest bookmark shortcut, so I wonder if it could be interfering in some way.

View solution in original post

Yes! I think you've most likely discovered the culprit! Those nasty extensions! I actually have an extension to disable all extensions (crazy right?) and I have to keep another browser around (since I generally use Chrome, this is Firefox) that has 0 extensions installed so I can test against my local environment, which is admittedly a bit crazy.

Nice community detective work here folks! 

Shar
Community Champion

Aha Pinterest is the culprit! Smiley Wink We've been noticing pinterest gobbly gook at the end of pages but it usually would have pinterest in the HTML code. Now that it's messing with yours, now we know it's not just something our instructors are doing.

Cheers - Shar