Support » Plugin: Google Doc Embedder » [Plugin: Google Doc Embedder] Not displaying doc with Internet Explorer and Greek filenames

  • Resolved beredim


    This bug appears when trying to embed a document that has a greek filename and viewing in Internet Explorer (9 and possibly older versions as well).

    An example of this bug can be viewed here:

    The above example post has has two pdf’s embedded.
    When viewed in Chrome or Firefox it displays correctly.

    When viewed in Internet Explorer the Greek filename doesn’t get decoded correctly and therefore doesn’t display. The download link however below the embedded document is correct and works.

    Any chance of looking at this??? (The target audience is not tech savvy and uses mainly IE)

Viewing 4 replies - 1 through 4 (of 4 total)
  • Ok so I think I have managed to patch this and posting the code below.

    I would appreciate it if the author of the plugin could check to see if this creates any problems.

    I edited the file gviewer.php located at the root folder of the plugin (/wp-content/plugins/google-document-embedder/gviewer.php).

    At line 161 i added the following code:
    $uefile = rawurlencode($uefile);

    So this is the final code around line 161:

    } else {
    			$uefile = $file;
    $uefile = rawurlencode($uefile);
    		// check for proxy
    		if ($gdeoptions['disable_proxy'] == "no") {

    So now the plugin works for Internet Explorer with Greek filenames.

    This is what guided me to the patch:

    url : The URL of the document to view. This should be URL-encoded.
    For example, if you wanted to view the PDF at the URL , you would use the URL:

    The src url that was being produced for the iframe wasn’t url encoded. It appears Chrome and Firefox were smart enough to bypass this and decode it correctly, but not IE.

    Plugin Author k3davis



    I’m sorry for my delay in responding. I am usually notified of threads here via RSS but seems unreliable at delivering these at times. 🙁

    I looked over your report (thanks for your research) and it appears I may be properly encoding the filename (note the line 147) but not the entire URL. I haven’t tested it yet but your suggested fix may break files that contain spaces in their names — however it’s certain that a similar fix can be offered (if in fact this one isn’t perfect already). Thanks for catching this error and I will be sure to repair it in the next version after further testing.


    Plugin Author k3davis


    I have a fix posted for you to try out if you wish. I’ll do some more testing and hopefully release an update tomorrow or Wednesday.

    I did have to do some additional reorganization to deal with spaced filenames, and all the other bug fixes intended for 2.5 have been rolled back for this bug fix release.

    If you get a chance to try it, please let me know how it fares.


    Plugin Author k3davis


    I did find additional fixes so please disregard the above build and download the official 2.4.4 release to fix this issue. Thanks again for your bug report.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Plugin: Google Doc Embedder] Not displaying doc with Internet Explorer and Greek filenames’ is closed to new replies.