CKEditor wysiwyg working in local not working in server - web

I am using ckeditor. when i work in localhost (in my pc) its working fine in formating and image upload.but when i work with it at server it formating and image upload is not working.
for ex. - if i formate font with some style and color and size its shows all effect front side on local but when i use same style same font and same color its not shows any formating or image on its front side.
for save that text i used mysql_real_escape_string() function i also tried mysql_escape_string() but both are working in local only not on server. :S
for image upload its path gose wrong into database so its not showing front side.
for ex.
local path -
(http://localhos/exo/uploads/24ysjdh.jpg)
server path - (http://mysite.in/%22/uploads/image/11/2qiz714.jpg/%22) (in this url %22 is making problem)
i dont know why the editor is working in local and not working in server. :S i faced this unique problem first time.

If you're using PHP MagicQuotes could be causing this. It seems like there is something wrong in the /uploads/image/11/2qiz714.jpg. There are extra /" wrapped around it is changing to /%22
/%22/uploads/image/11/2qiz714.jpg/%22
It is probably in code that generates the path. Are MagicQuotes turned on or off? Can you paste piece of your code that creates this path? once you find it double check that all the " and escaped /" are proper.

Related

Problem with Imagemagick import (import-im6.q16) jammy/gnome

I use Imagemagick's "import" (import-im6.q16) a lot for capturing screen data. And it works great on my primary workstation using the Mate desktop.
But I am trying to use it on Jammy/Gnome and it just hangs.
Nothing in any of the obvious logs (syslog,Xorg). Searched the web and the Imagemagick communities and come up empty.
Executing import tmp.png should turn the "cross-hair" cursor on and allow selection of a region of the default X display. Upon "mouse up", the selected region is written to the file specified. An existing file will be overwritten permissions permitting. The suffix should be an image file type or errors can occur (.pdf is an example).
Can anyone confirm this is broken or working with Gnome?

How to config MathJax for reveal.js when running offline?

In the reveal.js documentation, the MathJax section says that normally, MathJax is loaded from a remote server, and if you want to use MathJax offline you'll need to download a copy of the library and adjust the mathjax configuration value.
The configuration I'm trying is
math: {
mathjax: 'MathJax/MathJax.js',
config: 'TeX-AMS_HTML-full'
}
where MathJax/MathJax.js is the relative address of the MathJax.js file in a clone of the MathJax repository I have locally on my computer.
When I first load a page in the presentation with equations on it (or reload it by pressing F5 in the browser), I first see the LaTeX code for the equations for a short while, before seeing a rendering that looks very basic and not very nice but still okay, but then finally I see what looks like a nice rendering of the equations, but with thick frames around every character in the equations which completely mess up everything.
How should MathJax be configured properly, so that it looks identical to when MathJax is loaded from a remote server?

How can I print a utf8 string in the console using nodejs

I want to print a string in Bulgarian in the console using nodejs. I have a index.js file which does:
console.log('Текст на български.');
When I run it in the console with: node index.js It prints only - '??????????'
I am using Webstorm and I have set the IDE and Project File Encoding settings to utf8. I also tried:
var strInBulgarian = 'Текст на български.';
console.log(strInBulgarian.toString('utf8'));
The same result. If I run the following in nodejs REPL I get the correct result:
console.log('Текст на български.');
Which leads me to beleive that the reason I get '???????' is because of the file encoding, but it is set to utf8. Any ideas? Here is a screenshot from the settings in Webstorm.
Hmm now that I changed all of the settings to UTF8 the text that is in Bulgarian in my comments changed to '?????' and it was fine before that. Someting is definitely not right. When I make a index.js file from Notepad++ and set the encoding to utf8 I have no trouble there. Something is not right with the settings of Webstorm.
Webstorm's "Project Encoding" setting seems to only apply to newly added files. Judging from your screenshot (see lower-right corner), your individual files still use Windows-1252. You need to manually make Webstorm interpret each file as UTF-8.
Either through the dropdown menu on the bottom right of your window, after opening the file in question:
Or through the 'File Encodings' settings window itself:
Another possibility would be to directly mess with the .idea/encodings.xml file in your project dir, but I won't go into details there.
If you're using the standard Windows command prompt, you need to make sure that both the UTF8 code page is being used (chcp 65001) and that you are using the Lucida Console font instead of the Raster Fonts.
After making these changes, the text is shown just fine for me, both in the REPL and when executed from a file.

How to use MS Word to create html that displays correctly on windows and linux server?

When I create a document with MS Word and upload it to an html server it it correctly displayed when it is a windows server, but not when it is a linux server.
I tried this with both IE and Firefox.
The meta tag in the source says charset=windows-1252
Displaying the source code in the browser shows exactly the same source as I uploaded, so the server is not changing that. Nevertheless are characters like accented e displayed as silly characters when obtained from the linux server.
So somewhere in the tcp/http/??? records that the server sends to the browser makes the browser interpret the characters different from what is ment.
What could that be?
When you create a document in MS Word, there are a lot of characters that you can't see that are actually in the file, such as end of line markers, page breaks, etc. which you will not notice until after you upload the file to the server.
You should always use a plain text editor such as Notepad++, or even bluefish to create these files. Sometimes you can get MSWord to do the trick if you make sure to save the file as a web document(htm or html), but the special characters will usually begin to cause problems depending on your goal.

CKEditor and Font Color saved but not working

I've just installed CKEditor and call it with JS tag.
When I save the text, all the font attributes (indentation, space, size, decoration,etc.) are correctly saved .
The problem is that when I want to edit the data, with CKEditor, all these attributes are well loaded but the COLOR even if, in the example below, it's set to "BLUE"!
Which is very bizarre because when I can see the color style property in my database:
<h3 style=\"\\"color:blue\\"\">
<strong>aulne </strong>kjhqsdf <span style=\"\\"color:#008000;\\"\"><u>kjhkjsdfh </u></span>j'<span style=\"\\"\\\\"\\\\"\\"\"><em>espère </em></span><span style=\"\\"\\\\"\\\\"\\"\">bien<sup>2</sup></span></h3>
I found this old bug post http://dev.fckeditor.net/ticket/116
where no solution is found.
Thank very much,
regards.
I found the problem:
on the php side, before inserting, I was using the "addslash" function I forgot to remove.
Thanks again.
It stopped working when I commented out the stripslashes from the php code. So I was doing the opposite and not stripping the slashes. Once I read the other answer I thought dah, I commented the following out yesterday. Now works fine! Certain PHP modes like safe mode will generate extra slashes to lessen hack attempts so moving code from servers with different modes can cause issues. So this answer is the same but opposite reason. My server is in safe mode so it automatically adds the slashes and I must remove them.
$a10 = stripslashes($a10);

Resources