[latex3-commits] [git/LaTeX3-latex3-l3build] master: ctan-post: quote (ae96f16)
Will Robertson
will at wspr.io
Tue Dec 18 13:45:20 CET 2018
Repository : https://github.com/latex3/l3build
On branch : master
Link : https://github.com/latex3/l3build/commit/ae96f1614d2fd1a51a24407d5f2c32263c437fd6
>---------------------------------------------------------------
commit ae96f1614d2fd1a51a24407d5f2c32263c437fd6
Author: Will Robertson <wspr81 at gmail.com>
Date: Mon Sep 17 21:39:12 2018 +0930
ctan-post: quote
code markdown in my announcement text was trying to be executed :)
(also fix a 'cleanup' that broke things)
>---------------------------------------------------------------
ae96f1614d2fd1a51a24407d5f2c32263c437fd6
l3build-ctan-post.lua | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/l3build-ctan-post.lua b/l3build-ctan-post.lua
index 658d401..1b8ea80 100644
--- a/l3build-ctan-post.lua
+++ b/l3build-ctan-post.lua
@@ -63,6 +63,8 @@ local ctanupload = ctanupload or "ask"
function ctan_upload ()
+ ctan_post = ctan_post_command .. " "
+
-- field max desc mandatory multi
-- --------------------------------------------------------------------------------------------
ctan_field("pkg", ctan_pkg, 32, "the package name", true, false )
@@ -85,7 +87,6 @@ function ctan_upload ()
ctan_field("note", ctan_note, 4096, "internal note to ctan", false, false )
-- construct the curl command
- ctan_post = ctan_post_command .. " "
ctan_post = ctan_post .. " --form 'file=@" .. tostring(ctan_file) .. ";filename=" .. tostring(ctan_file) .. "'"
ctan_post = ctan_post .. " https://ctan.org/submit/"
@@ -181,7 +182,9 @@ function ctan_single_field(fname,fvalue,max,desc,mandatory)
if (max > 0 and string.len(vs) > max) then
error("The field " .. fname .. " is longer than " .. max)
end
- ctan_post=ctan_post .." --form " .. fname .. '="' .. vs:gsub('"','\\"') .. '"'
+ vs = vs:gsub('"','\\"')
+ vs = vs:gsub('`','\\`')
+ ctan_post=ctan_post .." --form " .. fname .. '="' .. vs .. '"'
end
else
error("The value of the field '" .. fname .."' must be a scalar not a table")
More information about the latex3-commits
mailing list