artlantis / evoluspencil

Automatically exported from code.google.com/p/evoluspencil
0 stars 0 forks source link

Exported HTML file with invalid URLs #225

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I just installed a fresh copy of Pencil 1.2

I installed "HTML Template with thumbnails using JQuery" to test HTML export. 
(Standalone)

The HTML export looked file when seen on local machine - but failed to load 
images when uploaded to server. (Both seen in Firefox 3.6)

When inspecting the HTML source I saw the image URLs to be incorrect:
"pages%5Cplugin_manager_plugins.png" where it should be:
"pages/plugin_manager_plugins.png"

The problem is that the forward slash / was URL encoded.
I don't know why it worked when viewed locally, but I had to clean up all URL 
references in order for the HTML output to properly work online.

Original issue reported on code.google.com by thomasse...@gmail.com on 11 Oct 2010 at 1:47

GoogleCodeExporter commented 8 years ago
I can confirm this also applies in the GUI 800*580 template as well and it 
makes it hard to create a shared demo. 

Original comment by neil.mu...@catalyse.net on 24 Nov 2010 at 10:34

GoogleCodeExporter commented 8 years ago
This corrects it for web export, but will probably screw ODT (probably should 
override it in WebPageExporter.js):

BaseRasterizedExporter.js: line 27
attr.nodeValue = path.replace(DirIO.sep,"/");

The basic problem is that the image path is "pages\image.png" which gets 
converted to %5C.

Original comment by neil.mu...@catalyse.net on 24 Nov 2010 at 11:46

GoogleCodeExporter commented 8 years ago
Any modern Browser should be able to translate a "/" into a "\" (or, as it is, 
%2C into %5C) if needed locally in a MS environment. 

On the other hand, things won't work vice versa (if you have %5C, it won't 
translate back to %2C if you need it online or on a Mac/Linux machine).

Suggestion: Why not make "\" the default on html export, and maybe make the 
other way optional?

Original comment by jan.stor...@googlemail.com on 8 Jun 2011 at 3:10

GoogleCodeExporter commented 8 years ago
Thank you for your bugfix on comment 2, Neil. It works well.

Original comment by andrebac...@gmail.com on 27 Jan 2012 at 1:04

GoogleCodeExporter commented 8 years ago
I guess my question is relatively stupid, but how do I apply this bug fix? I 
applied the change to the js, with no effect... but I get the feeling the whole 
Pencil/app directory is not being used when I'm exporting a document. A renamed 
a directory for fun and the export was still working. I'm on Windows and I 
tried with Pencil as a Firefox plugin and stand alone program, and I still have 
the problem. Any idea?

Original comment by guilla...@metayer.ca on 2 Feb 2012 at 3:04

GoogleCodeExporter commented 8 years ago
You will first have to extract the .xpi file (it is in reality just a .zip 
file).
Then you edit BaseRasterizedExporter.js.
After that, you zip the entire folder, change the file ending to .xpi and 
overwrite your original 
C:\users\<your_username>\AppData\Roaming\Mozilla\Firefox\Profiles\<random>.defau
lt\extensions\pencil@evolus.vn.xpi (This is the path for Windows Vista/7, it is 
slightly different for XP).

Original comment by andrebac...@gmail.com on 2 Feb 2012 at 3:19

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Please answer!!!

Why not make "\" the default on html export, and maybe make the other way 
optional?

Solution from #2 comment doesnt work for me!!!

Original comment by ggek...@gmail.com on 22 Nov 2012 at 7:28