fix: Refactor xss-lint exceptions that break the certificate share-in-facebook link (#30495)
* Remove xss-lint that break the certificate share in facebook link * Refactor xss-lint in fb share link * fix: Refactor xss-lint exceptions that break the certificate share-in-facebook link Co-authored-by: EC2 Default User <ec2-user@ip-172-31-1-149.ec2.internal>
This commit is contained in:
@@ -50,12 +50,8 @@ from openedx.core.djangolib.js_utils import js_escaped_string
|
||||
<h3 class="sr-only">${_("Print or share your certificate:")}</h3>
|
||||
% if facebook_share_enabled:
|
||||
<button class="action action-share-facebook btn-inverse btn-small icon-only" id="action-share-facebook"
|
||||
onclick="FaceBook.share({
|
||||
share_text: '${facebook_share_text | n, js_escaped_string}', ## xss-lint: disable=mako-invalid-html-filter
|
||||
share_link: '${share_url | n, js_escaped_string}', ## xss-lint: disable=mako-invalid-html-filter
|
||||
picture_link: '${full_course_image_url | n, js_escaped_string}', ## xss-lint: disable=mako-invalid-html-filter
|
||||
description: '${_('Click the link to see my certificate.') | n, js_escaped_string}' ## xss-lint: disable=mako-invalid-html-filter
|
||||
});">
|
||||
## xss-lint: disable=mako-invalid-html-filter
|
||||
onclick="FaceBook.share({share_text: '${facebook_share_text | n, js_escaped_string}', share_link: '${share_url | n, js_escaped_string}', picture_link: '${full_course_image_url | n, js_escaped_string}', description: '${_('Click the link to see my certificate.') | n, js_escaped_string}'});">
|
||||
<span class="icon fa fa-facebook-official" aria-hidden="true"></span>
|
||||
<span class="action-label">${_("Post on Facebook")}</span>
|
||||
</button>
|
||||
|
||||
Reference in New Issue
Block a user