diff --git a/plugins/dynamix.docker.manager/include/CreateDocker.php b/plugins/dynamix.docker.manager/include/CreateDocker.php index cce40f8605..07ff03630e 100644 --- a/plugins/dynamix.docker.manager/include/CreateDocker.php +++ b/plugins/dynamix.docker.manager/include/CreateDocker.php @@ -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'])) { @@ -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("
","\n", $xml['Overview'])); echo ""; } } @@ -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; @@ -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 = "
"+newConfig+"
"; newConfig = $($.parseHTML(newConfig)); @@ -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(" ","    "); - 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(" ","    "); + new_overview = marked(new_overview); + new_overview = new_overview.replaceAll("\n","
"); // has to be after marked $("#contDescription").html(new_overview); }