## a problem with space

hey guys, i got the following form that pulls info from the DB into a text field
Code ASP:
`response.write "<input type='text' name='name1' value='" & RS("PetName") & "' />"`
The problem is when i put a name with ' in it, then it wont write anything after the ', for example for aa'a then it'll write aa

so to solve it i removed the ' ' from the Value, it solved it but now if i got a text with spaces in it then it wont write anything after the first word
i thought something like Replace any space with a &nbsp; to solve it, like with VBnewline, BR, but how to do that?

thanks for the help