@on_event LOAD_ERROR set inject_html = \@($XDG_DATA_HOME/uzbl/scripts/load-error.sh '%1')\@
==== Script ====
The load-error.sh script's purpose is to replace the reason of error in a HTML template file
with the one provided by the LOAD_ERROR event.
As you see above we pass the reason of error to he script using the positional parameter %1.
The script will now read the HTML template and replace a string %%___REASON___%% with the passed
in error reason.
The load-error.sh script:
#!/bin/sh
#
#
TEMPLATE=/path/to/load-error.html
sed -e "s,___REASON___,$1," $TEMPLATE | sed -e 's#\(http.*\) [0-9]:\(.*\)#\2: \1#'
==== Template ====
Use the string %%___REASON___%% somewhere inside the HTML template which will be replaced with the actual reason of error.
The page you requested cannot be displayed.
___REASON___