From 3d9045271130969a8c81c3e2924e6bdf7aa1bdc9 Mon Sep 17 00:00:00 2001 From: Cedric RICARD Date: Tue, 8 Jul 2008 15:14:31 +0000 Subject: [PATCH] Removing Prefix (o, p, f) on input and form names --- calexium_lib/web/CXM_making_a_web_site.anubis | 82 +++++++++++++++++++++++++++++++++------------------------------------------------- 1 file changed, 33 insertions(+), 49 deletions(-) diff --git a/calexium_lib/web/CXM_making_a_web_site.anubis b/calexium_lib/web/CXM_making_a_web_site.anubis index a78edee..a29502e 100644 --- a/calexium_lib/web/CXM_making_a_web_site.anubis +++ b/calexium_lib/web/CXM_making_a_web_site.anubis @@ -1974,21 +1974,9 @@ define Int *** [3.1] Prefixing web arguments names. - We want to assign different roles to web arguments, and we also want to be able to - recognize its role directly from the name of a web argument. The name "s" is reserved - for the web argument whose value is the name of the current state. The name "a" is - reserved for the web argument whose value is the name of the action to be - performed. Other web arguments receive arbitrary names, and in order to avoid clashes, - these names are prefixed by: - - "p" for names of password inputs, - "o" for other web arguments - - The reason why password input names have a distinct prefix is that this allows the HTTP - server to hide the passwords on the console of the server and in the journal. + CR 2008-07-08 Prefixing Removed + - - *** [3.2] Separating web arguments. @@ -2047,23 +2035,19 @@ define (List(Web_arg) lwa) -> Separated_Web_Args($State) then if wa_1 is { - web_arg(n,v) then - with prefix = if substr(n,0,4) = "amp;" then substr(n,4,1) else substr(n,0,1), - name_start = (Int)(if substr(n,0,4) = "amp;" then 5 else 1), - if prefix = "s" then - swa(success(retrieve_state(v)),an1,op1) else - if prefix = "a" then - swa(ps1,success(v),op1) else - if prefix = "t" then - swa(ps1,an1,[web_arg("target",v) . op1]) else - if prefix = "p" then - swa(ps1,an1,[web_arg(substr(n,name_start,length(n)-name_start),v) . op1]) else - if prefix = "o" then - swa(ps1,an1,[web_arg(substr(n,name_start,length(n)-name_start),v) . op1]) else - swa(ps1,an1,op1), + web_arg(n, value) then + with name = if substr(n,0,4) = "amp;" then substr(n, 4, length(n) - 4) else n, + if name = "s" then + swa(success(retrieve_state(value)),an1,op1) + else if name = "a" then + swa(ps1,success(value),op1) + else if name = "t" then + swa(ps1,an1,[web_arg("target",value) . op1]) + else + swa(ps1,an1,[wa_1 . op1]), upload(n,v,t) then - swa(ps1,an1,[upload(substr(n,1,length(n)-1),v,t) . op1]) + swa(ps1,an1,[wa_1 . op1]) }} }. @@ -2716,7 +2700,7 @@ define String { [ ] then "", [h . t] then if h is (n,v) then - "&o"+n+"="+v+format_extra_operands(t) + "&"+n+"="+v+format_extra_operands(t) }. @@ -2910,7 +2894,7 @@ define URL_or_JavaScript [ "