mirror of
https://github.com/ansible/awx.git
synced 2026-03-13 15:09:32 -02:30
Merge pull request #7585 from philipsd6/enable-html-custom-login-info
Safely enable HTML in Custom Login Info Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
This commit is contained in:
@@ -88,6 +88,7 @@ export default ['$log', '$cookies', '$rootScope', 'ProcessErrors',
|
||||
}
|
||||
scope.customLoginInfo = $AnsibleConfig.custom_login_info;
|
||||
scope.customLoginInfoPresent = (scope.customLoginInfo) ? true : false;
|
||||
scope.customLoginInfoIsHTML = /<\/?[a-z][\s\S]*>/i.test(scope.customLoginInfo);
|
||||
});
|
||||
|
||||
if (scope.removeAuthorizationGetLicense) {
|
||||
|
||||
@@ -98,7 +98,12 @@
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<div id="login_modal_notice" class="LoginModalNotice" ng-if="customLoginInfoPresent"><div class="LoginModalNotice-title" translate>NOTICE</div>{{ customLoginInfo | sanitize }}</div>
|
||||
<div id="login_modal_notice" class="LoginModalNotice" ng-if="customLoginInfoPresent">
|
||||
<div class="LoginModalNotice-title" translate>NOTICE</div>
|
||||
<ng-bind-html ng-bind-html="customLoginInfo"
|
||||
ng-style="{'white-space' : customLoginInfoIsHTML ? 'initial' : 'pre-wrap'}">
|
||||
</ng-bind-html>
|
||||
</div>
|
||||
</div>
|
||||
<div class="LoginModal-footer">
|
||||
<div class="LoginModal-footerBlock">
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
color: @login-notice-text;
|
||||
overflow-y: scroll;
|
||||
overflow-x: visible;
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
|
||||
.LoginModalNotice-title {
|
||||
|
||||
Reference in New Issue
Block a user