Pervent reverse tabnabbing in edx platform
This commit is contained in:
@@ -294,7 +294,7 @@ from student.models import CourseEnrollment
|
||||
<li class="order-history">
|
||||
<span class="title">${_("Order History")}</span>
|
||||
% for order_history_item in order_history_list:
|
||||
<span><a href="${order_history_item['receipt_url']}" target="_blank" class="edit-name">${order_history_item['order_date']}</a></span>
|
||||
<span><a href="${order_history_item['receipt_url']}" rel="noopener" target="_blank" class="edit-name">${order_history_item['order_date']}</a></span>
|
||||
% endfor
|
||||
</li>
|
||||
% endif
|
||||
|
||||
@@ -67,13 +67,11 @@ from openedx.core.djangoapps.site_configuration import helpers as configuration_
|
||||
% endif
|
||||
<div class="mobile-nav-item hidden-mobile nav-item">
|
||||
% if online_help_token == "instructor":
|
||||
<a class="help-link" href="${get_online_help_info(online_help_token)['doc_url']}" target="_blank">${_("Help")}</a>
|
||||
<a class="help-link" href="${get_online_help_info(online_help_token)['doc_url']}" rel="noopener" target="_blank">${_("Help")}</a>
|
||||
% else:
|
||||
<a class="help-link" href="${configuration_helpers.get_value('SUPPORT_SITE_LINK', settings.SUPPORT_SITE_LINK)}" target="_blank">${_("Help")}</a>
|
||||
<a class="help-link" href="${configuration_helpers.get_value('SUPPORT_SITE_LINK', settings.SUPPORT_SITE_LINK)}" rel="noopener" target="_blank">${_("Help")}</a>
|
||||
% endif
|
||||
</div>
|
||||
<%include file="user_dropdown.html"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ from openedx.core.djangolib.markup import HTML, Text
|
||||
// new window/tab opening
|
||||
$('a[rel="external"], a[class="new-vp"]')
|
||||
.click( function() {
|
||||
window.open( $(this).attr('href') );
|
||||
window.open( $(this).attr('href'), '', 'noopener' );
|
||||
return false;
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user