diff options
author | pjmattal <pjmattal> | 2006-08-01 06:41:52 +0200 |
---|---|---|
committer | pjmattal <pjmattal> | 2006-08-01 06:41:52 +0200 |
commit | ffc0933126d113fc3c18ffc779ff1f9103908cc6 (patch) | |
tree | a1c74d78c6ca7ca9bb4b7715bb35b38e47ffdbb8 /web | |
parent | 885f309fbacc61f996e6e448fdd5d9604b7c3c6d (diff) | |
download | aur-ffc0933126d113fc3c18ffc779ff1f9103908cc6.tar.gz aur-ffc0933126d113fc3c18ffc779ff1f9103908cc6.tar.xz |
closed #2599: now removes " or ' from pkgdesc only if they form a start/end pair
Diffstat (limited to 'web')
-rw-r--r-- | web/html/pkgsubmit.php | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/web/html/pkgsubmit.php b/web/html/pkgsubmit.php index a76206e2..a3ac9ef7 100644 --- a/web/html/pkgsubmit.php +++ b/web/html/pkgsubmit.php @@ -237,9 +237,19 @@ if ($_COOKIE["AURSID"]) { if (count($lparts) == 2) { # this is a variable/value pair, strip out # array parens and any quoting, except in pkgdesc - # + # for pkgdesc, only remove start/end pairs of " or ' if ($lparts[0]=="pkgdesc") { - $pkgbuild[$lparts[0]] = trim($lparts[1], "\"\' "); + if ($lparts[1]{0} == '"' && + $lparts[1]{strlen($lparts[1])-1} == '"') { + $pkgbuild[$lparts[0]] = substr($lparts[1], 1, -1); + } + elseif + ($lparts[1]{0} == "'" && + $lparts[1]{strlen($lparts[1])-1} == "'") { + $pkgbuild[$lparts[0]] = substr($lparts[1], 1, -1); + } else { + $pkgbuild[$lparts[0]] = $lparts[1]; + } } else { $pkgbuild[$lparts[0]] = str_replace(array("(",")","\"","'"), "", $lparts[1]); |