WebDialog.set_html fails under Safari 5.0.6

Re: WebDialog.set_html fails under Safari 5.0.6

Postby fredo6 » Fri Sep 02, 2011 1:53 pm

thomthom wrote:I split of the discussion for this particular issue as it's a problem with the WebDialog class itself and not the plugin in itself.

I agree, and before we engage in workarounds and other approximate fixing, we really need to understand where the issue comes from and why it does materialized differently in two versions of Safari which should not be so different (5.03 and 5.06, correct?).

In any case, we need to hear from the SU team, because they must have an idea of how the web dialogs are integrated with Safari on Mac and clarify why security is handled differently by a set_html and a set_file.

Fredo
0
User avatar
fredo6 
PluginStore Author
PluginStore Author
 

Re: WebDialog.set_html fails under Safari 5.0.6

Postby TIG » Fri Sep 02, 2011 4:02 pm

Isn't it that there are three different BUT 'related' .set_ methods?

WebDialog.set_file
Used to set a local HTML file to display in the webdialog.
Arguments:
filename = The filename for the webdialog file (HTML file).
path = (optional) A path to which the filename is relative.
Returns: nil
Usage: dialog.set_file("C:\\Temp\\mypage.html")


OR
WebDialog.set_html
Used to load a string of HTML code into the webdialog.
Arguments:
html_string = A string of valid html to display in your webdialog.
Returns: nil
Usage: dialog.set_html("Hello world!")


OR
WebDialog.set_url
Used to load a specific URL into the webdialog,
i.e. it loads a web-site into the webdialog.
Arguments:
url = The URL for a specific web site.
Returns: nil
Usage: dialog.set_url("http://www.google.com")


They are not meant to be interchangeable :?
0
TIG
User avatar
TIG 
Global Moderator
 

Re: WebDialog.set_html fails under Safari 5.0.6

Postby thomthom » Fri Sep 02, 2011 4:12 pm

TIG: The problem is that when you use .set_html you do not get access to local resources any more under OSX Safari 5.0.6+.
0
Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
User avatar
thomthom 
PluginStore Author
PluginStore Author
 

Re: WebDialog.set_html fails under Safari 5.0.6

Postby Dan Rathbun » Sat Sep 03, 2011 2:38 am

Ok.. now, both Safari and Chrome use Webkit.

IF (assumption) both implement security polices in a similar way (on Mac via a manifest plist file inside the bundle,) you might compare the settings pre and post Safari 5.0.6.

On Chrome the settings are in file "com.google.Chrome.manifest", so (hoping,) that for Safari, the file would be something like "com.apple.Safari.manifest".

I'm going by the Chrome policy list when I suggest looking for policy "DisabledSchemes", or "SafeBrowsingEnabled", "ImagesBlockedForUrls", "JavaScriptAllowedForUrls", etc. (see the list... or find the list explicitly for Safari.)

P.S. : I wonder if Mac Sketchup changes any of these Safari security policies when it installs, to enable correct use of WebDialogs, ... and by upgrading to a newer Safari version, the policy file is overwritten. (So a comparison of the Safari manifest file, both pre and post Sketchup install, may also be in order.)
0
    I'm not here much anymore. But a PM will fire email notifications.
    User avatar
    Dan Rathbun 
    PluginStore Author
    PluginStore Author
     

    Re: WebDialog.set_html fails under Safari 5.0.6

    Postby driven » Sat Sep 03, 2011 4:27 am

    thomthom wrote:TIG: The problem is that when you use .set_html you do not get access to local resources any more under OSX Safari 5.0.6+.

    have you got an example of .set_html that works on older Safari, I've been going through all my old bits and I can't find an example that ever worked, heres some variations of .set_url and .set_file that all (bar one) work under Safari 5.0.6, I'm not including the files, unless you want them, it's more about the syntax, which is slightly different from 5.0.3 if you use .set_file("file:///...) Safari adds an additional file:/ to the url and reports an error
    Code: Select all
    dlg1 = UI::WebDialog.new("BoilerPlate1", true, "BP1", 200, 200, 110, 0, true);
    dlg1.set_url("file:///Library/Application%20Support/Google%20SketchUp%208/SketchUp/plugins/WD_BoilerPlate_cln/demo/tests.html")
    dlg1.set_background_color("#fff")
    dlg1.show_modal
    #works

    dlg2 = UI::WebDialog.new("BoilerPlate2", true, "BP2", 200, 200, 310, 0, true);
    dlg2.set_file("/Volumes/Macintosh HD/Library/Application Support/Google SketchUp 8/SketchUp/plugins/WD_BoilerPlate_cln/demo/elements.html")
    dlg2.set_background_color("#fff")
    dlg2.show_modal
    #works, BUT an external ajax call for js fails, local backup js loads instead

    dlg3 = UI::WebDialog.new("BoilerPlate3", true, "BP3", 200, 200, 510, 0, true);
    dlg3.set_file("/Library/Application Support/Google SketchUp 8/SketchUp/plugins/WD_BoilerPlate_cln/test/index.html")
    dlg3.set_background_color("pink")
    dlg3.show_modal
    #works

    dlg4 = UI::WebDialog.new("BoilerPlate4", true, "BP4", 200, 200, 710, 0, true);
    dlg4.set_url("file:///volumes/Macintosh%20HD/Library/Application%20Support/Google%20SketchUp%208/SketchUp/plugins/WD_BoilerPlate_cln/test/index.html")
    dlg4.set_background_color("grey")
    dlg4.show_modal
    #works

    dlg5 = UI::WebDialog.new("BoilerPlate5", true, "BP5", 200, 200, 910, 0, true);
    dlg5.set_url("file://localhost/Library/Application%20Support/Google%20SketchUp%208/SketchUp/plugins/WD_BoilerPlate_cln/404.html")
    dlg5.set_background_color("#fff")
    dlg5.show_modal   
    #works

    dlg6 = UI::WebDialog.new("BoilerPlate6", true, "BP6", 200, 200, 1110, 0, true);
    dlg6.set_file("/Library/Application Support/Google SketchUp 8/SketchUp/plugins/_LaptopLearnig/Ch1/TextBook.pdf")
    dlg6.set_background_color("#fff")
    dlg6.show_modal 
    #works

    dlg7 = UI::WebDialog.new("BoilerPlate7", true, "BP7", 200, 200, 1310, 0, true);
    dlg7.set_url("file:///volumes/Macintosh%20HD/Library/Application%20Support/Google%20SketchUp%208/SketchUp/plugins/_LaptopLearnig/Ch1/TextBook.pdf")
    dlg7.set_background_color("#fff")
    dlg7.show_modal
    #works

    dlg8 = UI::WebDialog.new("BoilerPlate8", true, "BP8", 200, 200, 1510, 0, true);
    dlg8.set_url("file://localhost/Library/Application%20Support/Google%20SketchUp%208/SketchUp/plugins/_LaptopLearnig/Ch1/TextBook.pdf")
    dlg8.set_background_color("#fff")
    dlg8.show_modal 
    #works

    dlg9 = UI::WebDialog.new("BoilerPlate9", true, "BP9", 200, 200, 1710, 0, true);
    dlg9.set_url("http://localhost/Library/Application%20Support/Google%20SketchUp%208/SketchUp/plugins/_LaptopLearnig/Ch1/TextBook.pdf")
    dlg9.set_background_color("#fff")
    dlg9.show_modal 
    # DOSEN'T work[it is a pdf afterall]... but do I get a Not Found message
    #The requested URL /Library/Application Support/Google SketchUp 8/SketchUp/plugins/_LaptopLearnig/Ch1/TextBook.pdf was not found on this server.

    dlg10 = UI::WebDialog.new("aceSUedit", false,"ace", 900, 600, 50, 350, false);
    dlg10.set_url("http://upstairs.lan/cloud9/cloud9/support/ace/ModalWindow.html")
    dlg10.show_modal
    #works and is an extremely complex html with lots of dynamic content


    I'll set these all up on Safari 5.0.3 tomorrow and see how they fair.
    john
    0
    learn from the mistakes of others, you may not live long enough to make them all yourself...

    driven 
    PluginStore Author
    PluginStore Author
     

    Re: WebDialog.set_html fails under Safari 5.0.6

    Postby Dan Rathbun » Sat Sep 03, 2011 6:40 am

    driven wrote: ... if you use .set_file("file:///...) Safari adds an additional file:/ to the url and reports an error...

    I'm purty sure that it's the Sketchup API UI::WebDialog code that prepends all set_file() arguments with "file://", happens on Windows as well.

    I tried set_file("file://localhost/path/to/local/file.html")
    and got that Sketchup error dialog (I believe it had the Sketchup icon in the upper left of the caption bar,) saying:
    'Could not find file: "file://file://localhost/path/to/local/file.html"'

    I would say that method should check to see if the substring is already there before prepending it.
    0
      I'm not here much anymore. But a PM will fire email notifications.
      User avatar
      Dan Rathbun 
      PluginStore Author
      PluginStore Author
       

      Re: WebDialog.set_html fails under Safari 5.0.6

      Postby Dan Rathbun » Sat Sep 03, 2011 7:55 am

      Here's a bug report at Webkit Bugzilla on local file:// handling broken.
      Webkit bug #10777
      It was reported in 2006 !

      The 'reporter' also filed a bug at apple: #4809075
      .. because he was unsure if it was Safari, or Webkit; but never got back to his original report and said what happened.
      So the status remains: UNCONFIRMED

      I tried to log into the apple bug reporter to check on #4809075, but got a login error.
      0
        I'm not here much anymore. But a PM will fire email notifications.
        User avatar
        Dan Rathbun 
        PluginStore Author
        PluginStore Author
         

        Re: WebDialog.set_html fails under Safari 5.0.6

        Postby TIG » Sat Sep 03, 2011 11:08 am

        ...if you use .set_file("file:///...) Safari adds an additional file:/ to the url and reports an error...
        BUT surely that's not really an 'error' ? It's just a logical application of some rules.
        The .set_file() method is expecting a file path - like 'C:/temp/myfile.txt'.
        The .set_url() method is expecting a url like 'http://www.forums.sketchucation.com' OR 'file:///C:/temp/myfile.txt' if it's a local file path.
        The .set_file() method takes its argument and it prepends a hard-coded initial 'file:///' to make it into suitable 'url' friendly code, from the bald file path: this is just like what happens when you try to open a local file with UI.openURL(), which requires that you have added the initial 'file:///' to any local file path etc.

        The .set_html() method is expecting a some 'html code as text' and this is a more serious issue, to this side one.
        0
        TIG
        User avatar
        TIG 
        Global Moderator
         

        Re: WebDialog.set_html fails under Safari 5.0.6

        Postby thomthom » Sat Sep 03, 2011 11:16 am

        driven wrote:have you got an example of .set_html that works on older Safari,

        webdialog.set_html( 'Hello World<hr><img src="file:///Users/thomas/Desktop/helloworld.jpg" alt="image should be here"><hr>Bye World' )
        Very crude example, invalid HTML, but it's the bare bones. The image would load in older Safari.

        Dan Rathbun wrote:P.S. : I wonder if Mac Sketchup changes any of these Safari security policies when it installs, to enable correct use of WebDialogs, ... and by upgrading to a newer Safari version, the policy file is overwritten. (So a comparison of the Safari manifest file, both pre and post Sketchup install, may also be in order.)

        Never been a problem before... Something must have changed at 5.0.6.
        0
        Thomas Thomassen — SketchUp Monkey & Coding addict
        List of my plugins and link to the CookieWare fund
        User avatar
        thomthom 
        PluginStore Author
        PluginStore Author
         

        Re: WebDialog.set_html fails under Safari 5.0.6

        Postby thomthom » Sat Sep 03, 2011 11:20 am

        .set_file and .set_url isn't really the problem here. They both work the same as pre-5.0.6 as far as I can tell.

        .set_html is the core of the problems.
        0
        Thomas Thomassen — SketchUp Monkey & Coding addict
        List of my plugins and link to the CookieWare fund
        User avatar
        thomthom 
        PluginStore Author
        PluginStore Author
         

        Re: WebDialog.set_html fails under Safari 5.0.6

        Postby Dan Rathbun » Sat Sep 03, 2011 5:07 pm

        thomthom wrote:
        Dan Rathbun wrote:P.S. : I wonder if Mac Sketchup changes any of these Safari security policies when it installs, ...

        Never been a problem before... Something must have changed at 5.0.6.

        Meaning, you have upgraded Safari a number of times in the past, without causing adverse effects on Sketchup WebDialogs ??
        0
          I'm not here much anymore. But a PM will fire email notifications.
          User avatar
          Dan Rathbun 
          PluginStore Author
          PluginStore Author
           

          Re: WebDialog.set_html fails under Safari 5.0.6

          Postby Dan Rathbun » Sat Sep 03, 2011 5:08 pm

          And can someone check the Apple Bug site.. to see if anyone else has filed a local resource regression bug for 5.0.6 ??
          0
            I'm not here much anymore. But a PM will fire email notifications.
            User avatar
            Dan Rathbun 
            PluginStore Author
            PluginStore Author
             

            Re: WebDialog.set_html fails under Safari 5.0.6

            Postby TIG » Sat Sep 03, 2011 5:17 pm

            Could this be the 'security update' that's messing it up?
            WebKit in Apple Safari before 5.0.6 has improper libxslt security settings, which allows remote attackers to create arbitrary files, and consequently execute arbitrary code, via a crafted web site. NOTE: this may overlap CVE-2011-1425.
            http://www.cvedetails.com/cve/CVE-2011-1774/ http://support.apple.com/kb/ht4808
            0
            TIG
            User avatar
            TIG 
            Global Moderator
             

            Re: WebDialog.set_html fails under Safari 5.0.6

            Postby Dan Rathbun » Sat Sep 03, 2011 5:34 pm

            Refering to my earlier post on Security Policies, I went thru the Apple Developer Library, and the Webkit.org docs, looking for a similar policy list to the Chrome list. Could not find anything. (Sheesh.. I hate that Apple website, so hard to find anything.)

            Has anyone checked to see if Safari has a manifest file like Chrome, with policy settings ??
            0
              I'm not here much anymore. But a PM will fire email notifications.
              User avatar
              Dan Rathbun 
              PluginStore Author
              PluginStore Author
               

              Re: WebDialog.set_html fails under Safari 5.0.6

              Postby thomthom » Sat Sep 03, 2011 7:03 pm

              Dan Rathbun wrote:
              thomthom wrote:
              Dan Rathbun wrote:P.S. : I wonder if Mac Sketchup changes any of these Safari security policies when it installs, ...

              Never been a problem before... Something must have changed at 5.0.6.

              Meaning, you have upgraded Safari a number of times in the past, without causing adverse effects on Sketchup WebDialogs ??

              Yes, at least not in terms of permissions. Updating Safari off course means updated render engine, like when you update IE. But never have I experienced blocking changes like this.
              0
              Thomas Thomassen — SketchUp Monkey & Coding addict
              List of my plugins and link to the CookieWare fund
              User avatar
              thomthom 
              PluginStore Author
              PluginStore Author
               

              Re: WebDialog.set_html fails under Safari 5.0.6

              Postby thomthom » Sat Sep 03, 2011 7:56 pm

              Summary
              In order to link to local resources in webdialogs one has to use file:/// prefix.

              Problem arise under OSX with Safari 5.0.6 or higher: local resources are not allowed to be accessed any more. Images, CSS and JS will not load. External resources do work though.

              What might be happening:
              Under windows when you use webdialog.set_html, document.location will report a file located in the user's temp folder.
              Under OSX on the other hand, document.location reports about:blank. So it appear to be feeding the HTML to the webdialog differently from Windows.

              The current theory to why .set_html fails in 5.0.6 is that a security issue has been closed where about:blank pages where used to gain access to the local resources. Due to the design differences between Windows and OSX .set_html now fails to load local resources.

              Workaround
              Here is a quick bare bone wrapper class:

              Issue
              Under OSX the garbage collector is not triggered upon SketchUp exit - so any webdialogs that's not been garbage collected will leave their temp files behiond. Looking into the matter...


              Code: Select all
              # Custom WebDialog wrapper that works around problems with WebDialog#set_html
              # under OSX after Safari 5.0.6 is installed.
              #
              # Example is bare bone without any error checking. Expand as you find fit.
              class WebDialogPatch < UI::WebDialog

                
              # @note Safari 5.0.6 made .set_html unusable under OSX because any links to
                #   resources ( Images, CSS, JS ) on the local computer failed to load.
                #   Previously it would work when you spesified file:/// but now it is denied.
                #
                # @param [String] html_string
                # @return [Nil]
                def set_html( html_string )
                  # Clean up any old temp file.
                  cleanup_temp_file()
                  # Finalizer is attached to the webdialog so when it gets garbage collected
                  # temp file is erased.
                  
                  # The temp filename needs to be different from the last on in order for the
                  # html to be loaded. If the name is the same the content is not refreshed.
                  #
                  # For both the temp directory and temp file handling with better error
                  # handling it'd probably best to port `tmpdir.rb` and `tempfile.rb` from
                  # the Standard Ruby Library.
                  #
                  # http://www.ruby-doc.org/stdlib-1.8.6/
                  tempdir = File.expand_path( ENV['TMPDIR'] || ENV['TMP'] || ENV['TEMP'] )
                  unique_seed = "#{self.object_id}#{Time.now.to_i}".hash.abs
                  filename 
              = "webdialog_#{unique_seed}.html"
                  @tempfile = File.join( tempdir, filename )
                  cleanup_proc = self.class.cleanup_temp_file( @tempfile.dup )
                  ObjectSpace.define_finalizer( self, cleanup_proc )
                  # Write the HTML content out to the temp file.
                  File.open( @tempfile, 'w' ) { |file|
                    file.write( html_string )
                  }
                  set_file_original( @tempfile )
                  nil
                end
                
                
              # @tempfile is set to `nil` when using #set_file and #set_url so the temp file
                # will be deleted. Since the #set_html wrapper uses #set_file it must be
                # aliased
                unless private_method_defined?( :set_file_original )
                  # Prevent redefining in case of script reloading which cause infinite loop.
                  alias :set_file_original :set_file
                  private 
              :set_file_original
                end
                
              # @param [String] filename
                # @return [Nil]
                def set_file( filename )
                  cleanup_temp_file()
                  set_file_original( filename )
                end
                
                
              # @param [String] url
                # @return [Nil]
                def set_url( url )
                  cleanup_temp_file()
                  super
                end
                
                
              # @return [Nil]
                def cleanup_temp_file
                  if 
              @tempfile
                    ObjectSpace
              .undefine_finalizer( @tempfile )
                    File.delete( @tempfile ) if File.exist?( @tempfile )
                  end
                  
              @tempfile = nil
                end
                private 
              :cleanup_temp_file
                
                
              # @private
                #
                # @see #set_html
                # @see http://www.mikeperham.com/2010/02/24/the-trouble-with-ruby-finalizers/
                #
                # @param [String] filename
                # @return [Proc]
                def self.cleanup_temp_file( filename )
                  proc { File.delete( filename ) if File.exist?( filename ) }
                end
                
              end 
              # class
               
              0
              Thomas Thomassen — SketchUp Monkey & Coding addict
              List of my plugins and link to the CookieWare fund
              User avatar
              thomthom 
              PluginStore Author
              PluginStore Author
               

              Re: WebDialog.set_html fails under Safari 5.0.6

              Postby driven » Sat Sep 03, 2011 9:21 pm

              a couple observation while trying to get my head around all of this.

              firstly, in Apples and probably Googles eyes the title of this thread should probably be 'WebDialog.set_html finally works as expected under Safari 5.0.6'. It does not appear to be not considered a 'bug', but a security enhancement.

              It seems to have been implemented in Safari 4, to stop about:blank pages pirating local files and that some problem/oversite has allowed files:/// and other anonymous url's to work with about:blank pages in SU WebDialog and other WebView apps.

              I have a number of html editors and they use temp files written to the relative folder, so if I try to edit index.html (for example) all the links, src's, url's, etc.. all remain relative and are considered safe. if I open the temp from a different folder I get load errors.

              Although I know temp files can be anywhere (with corrected links) I think they should be in the originating plugins subfolder if they are unavoidable.

              I also think bypassing 'about:blank' completely by having an actual html file that is then updated dynamically is also preferable.

              but, since I'm not writing the rubies, time permitting, I'll test whatever you want to try.

              john
              0
              learn from the mistakes of others, you may not live long enough to make them all yourself...

              driven 
              PluginStore Author
              PluginStore Author
               

              Re: WebDialog.set_html fails under Safari 5.0.6

              Postby thomthom » Sat Sep 03, 2011 10:15 pm

              I'm implementing a workaround where I manually use a temp file and .set_file into a patch I hope to release very soon.

              It seems that at implementation level of .set_html differs from OSX and Windows. Where under Windows they create a temp file and feed that file to the web control. Where under OSX this is not the case, which is why we get about:blank and therefore get affected by strengthens security controls.
              0
              Thomas Thomassen — SketchUp Monkey & Coding addict
              List of my plugins and link to the CookieWare fund
              User avatar
              thomthom 
              PluginStore Author
              PluginStore Author
               

              Re: WebDialog.set_html fails under Safari 5.0.6

              Postby Dan Rathbun » Sat Sep 03, 2011 10:19 pm

              That's nice but it will depend on your Library ?

              Has anyone logged this with Google ?? I'd think they'd wish to release patches if Safari 5.0.6 will break WebDialogs on all Mac versions.
              0
                I'm not here much anymore. But a PM will fire email notifications.
                User avatar
                Dan Rathbun 
                PluginStore Author
                PluginStore Author
                 

                Re: WebDialog.set_html fails under Safari 5.0.6

                Postby thomthom » Sat Sep 03, 2011 10:21 pm

                Dan Rathbun wrote:That's nice but it will depend on your Library ?

                Has anyone logged this with Google ?? I'd think they'd wish to release patches if Safari 5.0.6 will break WebDialogs on all Mac versions.

                The only thing you need to implement is TT::System.temp_path which returns the temp directory. Other than that, the code snipped I posted is standalone.
                0
                Thomas Thomassen — SketchUp Monkey & Coding addict
                List of my plugins and link to the CookieWare fund
                User avatar
                thomthom 
                PluginStore Author
                PluginStore Author
                 

                Re: WebDialog.set_html fails under Safari 5.0.6

                Postby thomthom » Sat Sep 03, 2011 11:30 pm

                Fixed a small bug in the sample code.
                0
                Thomas Thomassen — SketchUp Monkey & Coding addict
                List of my plugins and link to the CookieWare fund
                User avatar
                thomthom 
                PluginStore Author
                PluginStore Author
                 

                Re: WebDialog.set_html fails under Safari 5.0.6

                Postby Dan Rathbun » Sun Sep 04, 2011 12:02 am

                Not personal.. but I'd prefer to rely on "tmpdir.rb" in the Standard Lib.
                0
                  I'm not here much anymore. But a PM will fire email notifications.
                  User avatar
                  Dan Rathbun 
                  PluginStore Author
                  PluginStore Author
                   

                  Re: WebDialog.set_html fails under Safari 5.0.6

                  Postby thomthom » Sun Sep 04, 2011 5:54 am

                  Dan Rathbun wrote:Not personal.. but I'd prefer to rely on "tmpdir.rb" in the Standard Lib.

                  Sure, it's just a bare bone example. In fact, it'd probably be best to use tempfile.rb to create the temp file as well.
                  0
                  Thomas Thomassen — SketchUp Monkey & Coding addict
                  List of my plugins and link to the CookieWare fund
                  User avatar
                  thomthom 
                  PluginStore Author
                  PluginStore Author
                   

                  Re: WebDialog.set_html fails under Safari 5.0.6

                  Postby thomthom » Sun Sep 04, 2011 7:12 am

                  I did some further testing I found some issues which I addressed in my example: viewtopic.php?f=180&t=39842&p=352375#p352375

                  .set_file doesn't cause the content of the webdialog to update if the filename is the same. So I made the example generate a new file with a unique seed in the filename to ensure it's updated.

                  .set_file and .set_url now immediately cleans up the temp file if .set_html was used prior.

                  No more references to my TT_Lib in the example.

                  Linked to the Standard Lib in the comments for more robust temp file handlers.
                  0
                  Thomas Thomassen — SketchUp Monkey & Coding addict
                  List of my plugins and link to the CookieWare fund
                  User avatar
                  thomthom 
                  PluginStore Author
                  PluginStore Author
                   

                  Re: WebDialog.set_html fails under Safari 5.0.6

                  Postby Dan Rathbun » Sun Sep 04, 2011 7:35 am

                    Can these meta tags be injected to prevent caching:
                    <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
                    <META HTTP-EQUIV="Expires" CONTENT="-1">


                    ref: How to prevent caching in Internet Explorer
                    0
                      I'm not here much anymore. But a PM will fire email notifications.
                      User avatar
                      Dan Rathbun 
                      PluginStore Author
                      PluginStore Author
                       

                      Re: WebDialog.set_html fails under Safari 5.0.6

                      Postby thomthom » Sun Sep 04, 2011 7:59 am

                      Dan Rathbun wrote:
                        Can these meta tags be injected to prevent caching:
                        <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
                        <META HTTP-EQUIV="Expires" CONTENT="-1">


                        ref: How to prevent caching in Internet Explorer

                        I did consider sending a refresh comment to JS, but I figured I'd follow the pattern of how .set_html works on Windows, which is creating a temp file with a unique name.
                        0
                        Thomas Thomassen — SketchUp Monkey & Coding addict
                        List of my plugins and link to the CookieWare fund
                        User avatar
                        thomthom 
                        PluginStore Author
                        PluginStore Author
                         

                        Re: WebDialog.set_html fails under Safari 5.0.6

                        Postby Dan Rathbun » Sun Sep 04, 2011 8:41 am

                        Dan Rathbun wrote:Has anyone logged this with Google ?? I'd think they'd wish to release patches if Safari 5.0.6 will break WebDialogs on all Mac versions.

                        TT ?
                        0
                          I'm not here much anymore. But a PM will fire email notifications.
                          User avatar
                          Dan Rathbun 
                          PluginStore Author
                          PluginStore Author
                           

                          Re: WebDialog.set_html fails under Safari 5.0.6

                          Postby thomthom » Sun Sep 04, 2011 9:15 am

                          I've not logged anything yet. Been bugging a couple to see if they could shed some light.
                          0
                          Thomas Thomassen — SketchUp Monkey & Coding addict
                          List of my plugins and link to the CookieWare fund
                          User avatar
                          thomthom 
                          PluginStore Author
                          PluginStore Author
                           

                          Re: WebDialog.set_html fails under Safari 5.0.6

                          Postby thomthom » Sun Sep 04, 2011 9:21 am

                          Driven: I implemented a patch. Update to TT_Lib 2.5.5
                          viewtopic.php?f=323&t=30503
                          0
                          Thomas Thomassen — SketchUp Monkey & Coding addict
                          List of my plugins and link to the CookieWare fund
                          User avatar
                          thomthom 
                          PluginStore Author
                          PluginStore Author
                           

                          Re: WebDialog.set_html fails under Safari 5.0.6

                          Postby fredo6 » Sun Sep 04, 2011 10:11 am

                          To all,

                          Can we summarize what is the problem and what could be the workaround.

                          From what Driven has signaled, there are problems in both 5.0.3 and 5.0.6 Safari versions.

                          Also it would be good to hear from the Google SU Team, as they can perfectly implement a central solution that makes set_htmlwork.

                          Fredo
                          0
                          User avatar
                          fredo6 
                          PluginStore Author
                          PluginStore Author
                           

                          SketchUcation One-Liner Adverts

                          by Ad Machine » 5 minutes ago



                          Ad Machine 
                          Robot
                           

                          PreviousNext


                           

                          Return to Developers' Forum

                          Who is online

                          Users browsing this forum: Bing [Bot] and 8 guests

                          Visit our sponsors: