mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Escaping angle brackets in a device config file
The configuration file may contain brackets (">" or "<"), which must be escaped
This commit is contained in:
@ -39,9 +39,9 @@ $(document).ready(function() {
|
|||||||
url: "{% url 'dcim-api:device-napalm' pk=object.pk %}?method=get_config",
|
url: "{% url 'dcim-api:device-napalm' pk=object.pk %}?method=get_config",
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
success: function(json) {
|
success: function(json) {
|
||||||
$('#running_config').html($.trim(json['get_config']['running']));
|
$('#running_config').text($.trim(json['get_config']['running']));
|
||||||
$('#startup_config').html($.trim(json['get_config']['startup']));
|
$('#startup_config').text($.trim(json['get_config']['startup']));
|
||||||
$('#candidate_config').html($.trim(json['get_config']['candidate']));
|
$('#candidate_config').text($.trim(json['get_config']['candidate']));
|
||||||
},
|
},
|
||||||
error: function(xhr) {
|
error: function(xhr) {
|
||||||
alert(xhr.responseText);
|
alert(xhr.responseText);
|
||||||
|
Reference in New Issue
Block a user