[aur-dev] [PATCH/RFC 2/6] Strip whitespace from .AURINFO lines

Lukas Fleischer archlinux at cryptocrack.de
Fri Jan 17 05:46:25 EST 2014


Indentation can be useful if one wants to structure an .AURINFO file.
Remove leading and trailing whitespace from each line before parsing.

Signed-off-by: Lukas Fleischer <archlinux at cryptocrack.de>
---
 web/html/pkgsubmit.php | 1 +
 1 file changed, 1 insertion(+)

diff --git a/web/html/pkgsubmit.php b/web/html/pkgsubmit.php
index 49fb1b2..7ae0c1c 100644
--- a/web/html/pkgsubmit.php
+++ b/web/html/pkgsubmit.php
@@ -263,6 +263,7 @@ if ($uid):
 		unset($pkg_version);
 		$depends = array();
 		foreach (explode("\n", $srcinfo_raw) as $line) {
+			$line = trim($line);
 			if (empty($line) || $line[0] == '#') {
 				continue;
 			}
-- 
1.8.5.3



More information about the aur-dev mailing list