Prevents user from modifying a note not belonging to them

Adds a 'disabled' session variable as well as a database tie-in
Additionally fixes a bug where some punctuation was not properly escaped