Update index.php

fixed text output and allow spaces in text filter