Deprecated the 'script_raw' option in favour of an output type specifier. 'escaped' will wrap output in PRE tags and esape the HTML entities in the output. 'html' will not and allows the script to include HTML markup. 'raw' is the former 'script_raw' option and directly streams output to the browser.
parent
dfe9cc2393
commit
5cbf942f99
@ -0,0 +1,7 @@ |
|||||||
|
#!/bin/sh |
||||||
|
|
||||||
|
echo "Here's some <b>bold</b> text. The output of ls:<pre style='background-color: #F2F2F8'>" |
||||||
|
|
||||||
|
ls |
||||||
|
|
||||||
|
echo '</pre><br>A link:<br><br><a href="http://www.google.com">Google.com</a>' |
@ -0,0 +1,38 @@ |
|||||||
|
{ |
||||||
|
"title": "Output type callback examples", |
||||||
|
"forms": { |
||||||
|
"show_image": { |
||||||
|
"title": "Show an image", |
||||||
|
"description": "Shows you an image. This is a 'raw' output type where the script writes a complete HTTP response to stdout, which is directly streamed to the browser by scriptform.", |
||||||
|
"submit_title": "Show", |
||||||
|
"script": "job_show_image.sh", |
||||||
|
"output": "raw", |
||||||
|
"fields": {} |
||||||
|
}, |
||||||
|
"large_bin": { |
||||||
|
"title": "Download large binary file", |
||||||
|
"description": "Download a large (100mb) binary file. This demonstrated streaming directly to the client of large files.", |
||||||
|
"submit_title": "Download", |
||||||
|
"script": "job_large_bin.sh", |
||||||
|
"output": "raw", |
||||||
|
"fields": {} |
||||||
|
}, |
||||||
|
"some_html": { |
||||||
|
"title": "Show some HTML", |
||||||
|
"description": "This is the 'html' output type, which allows HTML in the output of scripts. This can be useful to refer to another form after this form is completed, for instance.", |
||||||
|
"submit_title": "Show HTML", |
||||||
|
"script": "job_show_html.sh", |
||||||
|
"output": "html", |
||||||
|
"fields": {} |
||||||
|
}, |
||||||
|
"escaped": { |
||||||
|
"title": "Escaped contents (default)", |
||||||
|
"description": "This is the 'escaped' output type. It is the default. The HTML entities in the output are escaped properly, and is wrapped in PRE elements.", |
||||||
|
"submit_title": "Show HTML", |
||||||
|
"script": "job_show_html.sh", |
||||||
|
"output": "escaped", |
||||||
|
"fields": {} |
||||||
|
} |
||||||
|
|
||||||
|
} |
||||||
|
} |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
@ -1,21 +0,0 @@ |
|||||||
{ |
|
||||||
"title": "Raw callback examples", |
|
||||||
"forms": { |
|
||||||
"show_image": { |
|
||||||
"title": "Show an image", |
|
||||||
"description": "Shows you an image", |
|
||||||
"submit_title": "Show", |
|
||||||
"script": "job_show_image.sh", |
|
||||||
"script_raw": true, |
|
||||||
"fields": {} |
|
||||||
}, |
|
||||||
"large_bin": { |
|
||||||
"title": "Download large binary file", |
|
||||||
"description": "Download a large (100mb) binary file", |
|
||||||
"submit_title": "Download", |
|
||||||
"script": "job_large_bin.sh", |
|
||||||
"script_raw": true, |
|
||||||
"fields": {} |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
Loading…
Reference in new issue