Grep Plugin pull request with code review applied

Hi,

New pull request with all code review feedback applied.

See commit: 48ff73a086a95e2c34940e6e7317fed3c7ebccc4

This commit list files to take for merging:

- core/controllers/csp/utils.py
- plugins/grep/csp.py
- plugins/tests/grep/test_csp.py

Thanks in advance :wink: