!7 static File dir; p { dir = javaxDataDir("Static Web Pages"); } html { uri = dropPrefix("/", uri); if (eq(uri, "upload")) { S html = params.get('html); S title = dropAllTags(html); S name = uniqueFileNameUsingMD5_80_v2(title, md5(html)) + ".html"; ret "Saved as: " + ahref(rawSelfLink(name), name); } S name = urldecode(uri); if (!isProperFileName_allowSpaces(name)) ret subBot_serve404("Bad chars"); File f = newFile(dir, name); if (!fileExists(f)) ret subBot_serve404(); ret loadTextFile(f); }