Move some code to a function to avoid future duplication. Allow autocomplete on ping page. Add more escaping to command.
Move some code to a function to avoid future duplication. Allow autocomplete on ping page. Add more escaping to command.