summaryrefslogtreecommitdiff
path: root/src/scriptcheck.sml
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2009-04-16 12:36:01 -0400
committerGravatar Adam Chlipala <adamc@hcoop.net>2009-04-16 12:36:01 -0400
commit51e34115de1d243904e9b49c3839fde9c91c96c9 (patch)
treee5b913873d3ffcd5abcc024dbc7d74e8d1c2aad2 /src/scriptcheck.sml
parent949880b71b6b3d105ff5d73b1cf6958509b85c1e (diff)
onError
Diffstat (limited to 'src/scriptcheck.sml')
-rw-r--r--src/scriptcheck.sml16
1 files changed, 4 insertions, 12 deletions
diff --git a/src/scriptcheck.sml b/src/scriptcheck.sml
index a3928921..352ef46c 100644
--- a/src/scriptcheck.sml
+++ b/src/scriptcheck.sml
@@ -60,13 +60,6 @@ fun classify (ds, ps) =
fun hasClient {basis, words, onload} csids =
let
- fun realOnload ss =
- case ss of
- [] => false
- | (EFfiApp ("Basis", "get_settings", _), _) :: ss => realOnload ss
- | (EPrim (Prim.String s), _) :: ss => not (String.isPrefix "'" s)
- | _ => true
-
fun hasClient e =
case #1 e of
EPrim (Prim.String s) => List.exists (fn n => inString {needle = n, haystack = s}) words
@@ -79,11 +72,10 @@ fun classify (ds, ps) =
| ESome (_, e) => hasClient e
| EFfi ("Basis", x) => SS.member (basis, x)
| EFfi _ => false
- | EFfiApp ("Basis", "strcat", all as ((EPrim (Prim.String s1), _) :: ss)) =>
- if onload andalso String.isSuffix " onload='" s1 then
- realOnload ss orelse List.exists hasClient all
- else
- List.exists hasClient all
+ | EFfiApp ("Basis", "maybe_onload",
+ [(EFfiApp ("Basis", "strcat", all as [_, (EPrim (Prim.String s), _)]), _)]) =>
+ List.exists hasClient all
+ orelse (onload andalso size s > 0)
| EFfiApp ("Basis", x, es) => SS.member (basis, x)
orelse List.exists hasClient es
| EFfiApp (_, _, es) => List.exists hasClient es