I am using Rockmongo as the UI, and I am trying to save something every similar to this.
text text's text. <p>text this is where the text goes</p><h1>haha</h1>
Now I am not sure if it is the .,'
or even the ? <p>
etc.
I was unable to reproduce this. Here is what I tried in the JavaScript shell:
> db.text.save({_id:1, text:"text text's text. <p>text this is where the text goes</p><h1>haha</h1>"})
> db.text.find()
{ "_id" : 1, "text" : "text text's text. <p>text this is where the text goes</p><h1>haha</h1>" }
The line was saved successfully. Are you surrounding the text string with double quotes " ? As bfavaretto mentioned, the issue could be from the single apostrophe in your string. The following will not work:
> db.text.drop()
true
> db.text.save({_id:1, text:'This is text with an extra ' apostrophe.'})
...
...
> db.text.find()
>
As you can see, the above document was not saved because the string was not properly formatted. In fact, the JS shell never even executed the command.
Mongo should be able to save a string containing all of these characters. If you are still having issues, perhaps this could be an issue with RockMongo? (Unfortunately, I am not familiar with this program.) A simple way to troubleshoot is to test saving each unique character one at a time, and see which character causes the issue. Hope this helps!