<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def shellfilter(value):
 """Replace HTML chars for shell usage."""

    replacements = {'\\': '\\\\',
                    '`': '\\`',
                    "'": "\\'",
                    '"': '\\"'}
    for search, repl in replacements.items():
        value = value.replace(search, repl)
    return safestring.mark_safe(value)