Yeah, the plus is being turned into a space as per http standards. Adding something like text = text.replace(/\+/g, '%2B') somewhere in ShowPreview() should fix it.
I took a closer look at the code you posted, and noticed that it's trying to use encodeURIComponent(). Which is good, because encodeURIComponent escapes '+'s. Unfortunately, if encodeURIComponent is not available, it falls back to escape(), which does not escape '+'s. So it looks like the fix required would actually be to change text = (encodeURIComponent) ? encodeURIComponent(document[FormName].Body.value) :
escape(document[FormName].Body.value); to text = (encodeURIComponent) ? encodeURIComponent(document[FormName].Body.value) :
escape(document[FormName].Body.value.replace(/\+/g, '%2B'));
They should be there, and indeed will be there soon, but my host/account is just cursed to continually have problems. Give me a couple of days and it should be sorted out. Nevermind, just put them on googlepages.
In the meantime, though, you can download the php file here (no char limit or attachments would really help in situations like these).
I just tried this and it didn't work. I have preview.js set up and everything.
I am guessing my version of vanilla (0.9.2.6) is the problem?
Upgrading the beta is too taxing for me mediocre brain
Google Page Creator is having a little trouble with your site right now. This is not because of anything you did; it's just a little hiccup in our system that will hopefully go away soon. We apologize for the inconvenience, and recommend you try reloading this page.
If you need a place to host it let me know I have a few hundred MB on my server not being used :-)
I just tried this and it didn't work. I have preview.js set up and everything.
That's odd... It's one of the few extensions that actually does work for people. Unless for some reason the SCRIPT_FILENAME $_SERVER index isn't there; I think one other person had that problem. Try replacing the if(realpath($_SERVER['SCRIPT_FILENAME'])...) //a preview? with $PreviewSelf = substr(str_replace("\\", '/', __FILE__), strlen(__FILE__)-strlen($_SERVER['PHP_SELF']));
if(!strcasecmp($PreviewSelf, $_SERVER['PHP_SELF']) && !defined('EXTENSION_IN_PREVIEW')) and see what happens.
@ccmehil: It's currently working fine for me, but I'll also put them on my own hosting account (to be) in the weekend.
Fatal error: Class previewform: Cannot inherit from undefined class discussionform in /home/answerus/domains/answerus.com/public_html/extensions/PreviewPost/default.php on line 49
is what i get after uploading js/preview.js and the extension plug-in when i click on a thread.
When i use the Preview Post Extension and i type things like ü,ö ä or ß there are just question marks displayed in the preview. When I post the comment it's shown correct.
Comments
text = text.replace(/\+/g, '%2B')
somewhere in ShowPreview() should fix it.text = (encodeURIComponent) ? encodeURIComponent(document[FormName].Body.value) : escape(document[FormName].Body.value);
totext = (encodeURIComponent) ? encodeURIComponent(document[FormName].Body.value) : escape(document[FormName].Body.value.replace(/\+/g, '%2B'));
In the meantime, though, you can download the php file here (no char limit or attachments would really help in situations like these).
Google Page Creator is having a little trouble with your site right now.
This is not because of anything you did; it's just a little hiccup in our system that will hopefully go away soon. We apologize for the inconvenience, and recommend you try reloading this page.
If you need a place to host it let me know I have a few hundred MB on my server not being used :-)
That's odd... It's one of the few extensions that actually does work for people. Unless for some reason the SCRIPT_FILENAME $_SERVER index isn't there; I think one other person had that problem. Try replacing the if(realpath($_SERVER['SCRIPT_FILENAME'])...) //a preview? with
$PreviewSelf = substr(str_replace("\\", '/', __FILE__), strlen(__FILE__)-strlen($_SERVER['PHP_SELF'])); if(!strcasecmp($PreviewSelf, $_SERVER['PHP_SELF']) && !defined('EXTENSION_IN_PREVIEW'))
and see what happens.@ccmehil: It's currently working fine for me, but I'll also put them on my own hosting account (to be) in the weekend.
is what i get after uploading js/preview.js and the extension plug-in when i click on a thread.