HTML modified in Assignment API Calls

epulham
Community Contributor

We are using the Assignments API to generate a whole ton of assignments. I know that CSS is not an accepted language thru the API call (it basically ignores the whole call or ignores the entire description parameter if there is any CSS in there), but the parameter "description" specifically says it accepts HTML, so we've been adding HTML to our Assignments API in the hopes that it makes our designing faster for us and our instructors. 

Our most recent call showed that Canvas rejected a typical a-tag with an external link. It simply truncated the HTML as if the a tag wasn't present in there at all. Everything else in the call went through beautifully.

Here is the HTML code we tried putting through:

<h3><strong>
<img id="117764346" src="https://mtec.beta.instructure.com/courses/727356/files/117764346/preview" alt="presentation thinned out.png" />
</strong></h3>
<h3><strong>Guidelines</strong></h3>
<p>Attend the in-person class and demonstrations on the topics in this presentation. Review the slides below.</p>
<p>[insert slideshow or other presentation information]</p>
<p>Your teacher will mark you as having passed this class when you have attended it. You do not need to submit anything for this assignment.</p>
<hr />
<p>Need help using Canvas Assignments? If so, please review the following guide: <a title="Canvas Student Guide - Assignments" href="https://community.canvaslms.com/docs/DOC-4121#jive_content_id_Assignments" target="_blank" rel="noopener">
<span>Canvas Student Guide - Assignments</span>
</a>
</p>

And here's the output when I check what was loaded into Canvas:

<h3><strong>
<img id="117764346" src="https://mtec.beta.instructure.com/courses/727356/files/117764346/preview" alt="presentation thinned out.png" data-api-endpoint="https://mtec.beta.instructure.com/api/v1/courses/727356/files/117764346" data-api-returntype="File" />
</strong></h3>
<h3><strong>Guidelines</strong></h3>
<p>Attend the in-person class and demonstrations on the topics in this presentation. Review the slides below.</p>
<p>[insert slideshow or other presentation information]</p>
<p>Your teacher will mark you as having passed this class when you have attended it. You do not need to submit anything for this assignment.</p>
<hr />
<p>Need help using Canvas Assignments? If so, please review the following guide:</p>

image of output displayed in Canvas:

Screen Shot 2021-06-29 at 10.55.24 AM.png

 

 

 

Has anyone else encountered this issue?

 

Labels (1)