Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 9 additions & 14 deletions plugins/dynamix.docker.manager/include/CreateDocker.php
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,8 @@ function cpu_pinning() {
$arrConfig['Name'] = 'AppData Config Path';
}
}
$arrConfig['Name'] = strip_tags($arrConfig['Name']);
$arrConfig['Description'] = strip_tags($arrConfig['Description']);
}
}
if (!empty($dockercfg['DOCKER_APP_UNRAID_PATH']) && file_exists($dockercfg['DOCKER_APP_UNRAID_PATH'])) {
Expand Down Expand Up @@ -252,7 +254,8 @@ function cpu_pinning() {
}
}
}
$xml['Description'] = str_replace(['[', ']'], ['<', '>'], $xml['Overview']);
$xml['Overview'] = str_replace(['[', ']'], ['<', '>'], $xml['Overview']);
$xml['Description'] = $xml['Overview'] = strip_tags(str_replace("<br>","\n", $xml['Overview']));
echo "<script>var Settings=".json_encode($xml).";</script>";
}
}
Expand Down Expand Up @@ -307,11 +310,6 @@ function cpu_pinning() {
return this.replace(new RegExp(str1.replace(/([\/\,\!\\\^\$\{\}\[\]\(\)\.\*\+\?\|\<\>\-\&])/g,"\\$&"),(ignore?"gi":"g")),(typeof(str2)=="string")?str2.replace(/\$/g,"$$$$"):str2);
};
}
function simplef() {
var text = arguments[0];
for (var i=1,arg; arg=arguments[i]; i++) text = text.replace('%s',arg);
return _(text);
}
// Create config nodes using templateDisplayConfig
function makeConfig(opts) {
confNum += 1;
Expand All @@ -329,7 +327,7 @@ function makeConfig(opts) {
escapeQuote(opts.Value),
opts.Buttons,
opts.Required=='true' ? 'required' : '',
simplef('Container %s',opts.Type)
sprintf('Container %s',opts.Type)
);
newConfig = "<div id='ConfigNum"+opts.Number+"' class='config_"+opts.Display+"'' >"+newConfig+"</div>";
newConfig = $($.parseHTML(newConfig));
Expand Down Expand Up @@ -1044,13 +1042,10 @@ function toggleAllocations() {
function load_contOverview() {
var new_overview = $("textarea[name='contOverview']").val();
new_overview = new_overview.replaceAll("[","<").replaceAll("]",">");
// if no html tags are present, treat the overview as Markdown
if ( stripTags(new_overview) == new_overview ) {
// Handle code block being created by authors indenting (manually editing the xml and spacing)
new_overview = new_overview.replaceAll(" ","&nbsp;&nbsp;&nbsp;&nbsp;");
new_overview = marked(new_overview);
} else
new_overview = new_overview.replaceAll("\n","");
// Handle code block being created by authors indenting (manually editing the xml and spacing)
new_overview = new_overview.replaceAll(" ","&nbsp;&nbsp;&nbsp;&nbsp;");
new_overview = marked(new_overview);
new_overview = new_overview.replaceAll("\n","<br>"); // has to be after marked
$("#contDescription").html(new_overview);
}

Expand Down