I am using SQL server 2012, & always use SP_HELPTEXT to get my previously created Stored Procedures, In previous versions of SQL server there were no issues
SP_HELPTEXT
I too faced this issue for a view.
Below are steps i used to resolve the issue (note only a temporary fix)
1)select the query
2)then right click and open in query designer
3)click ok
you would notice all the extra spaces are removed.
Note: this works only for simple queries not for procedures,etc