aboutsummaryrefslogtreecommitdiffstats
path: root/config/systempatches/system_patches_edit.php
diff options
context:
space:
mode:
Diffstat (limited to 'config/systempatches/system_patches_edit.php')
-rw-r--r--config/systempatches/system_patches_edit.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/config/systempatches/system_patches_edit.php b/config/systempatches/system_patches_edit.php
index bfa0af36..32318620 100644
--- a/config/systempatches/system_patches_edit.php
+++ b/config/systempatches/system_patches_edit.php
@@ -100,7 +100,8 @@ if ($_POST) {
$thispatch['descr'] = $_POST['descr'];
$thispatch['location'] = patch_fixup_url($_POST['location']);
if (!empty($_POST['patch'])) {
- $thispatch['patch'] = base64_encode($_POST['patch']);
+ /* Strip DOS style carriage returns from textarea input */
+ $thispatch['patch'] = base64_encode(str_replace("\r", "", $_POST['patch']));
}
if (is_github_url($thispatch['location']) && ($_POST['pathstrip'] == 0))
$thispatch['pathstrip'] = 1;