Open in editor? dialog for html when viewing IE source

For technical support for all editions of CSS HTML Validator. Includes bug reports.
Post Reply
User avatar
RSteinwand
Rank VI - Professional
Rank VI - Professional
Posts: 551
Joined: Mon Jun 09, 2008 2:12 pm
Location: Fargo, ND
Contact:

Open in editor? dialog for html when viewing IE source

Post by RSteinwand » Mon Oct 31, 2016 1:44 pm

Hi Albert,

I have CSE configured to open source from IE and each time I get the unrecognizable file type.

Couldn't you do a quick test for html from the first 20 characters and determine if it's html from that? Seems to me you had a check for html in v.16 when monitoring the clipboard. I would think that would be an easy fix. I wouldn't mind if it was only 90% accurate. :D

Thanks.
Rick

User avatar
Albert Wiersch
Site Admin
Site Admin
Posts: 3222
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX
Contact:

Re: Open in editor? dialog for html when viewing IE source

Post by Albert Wiersch » Mon Oct 31, 2016 4:43 pm

Hi Rick,

Sure. I will look into this for v17. I don't think it should be too difficult. :)
Image
Albert Wiersch

User avatar
RSteinwand
Rank VI - Professional
Rank VI - Professional
Posts: 551
Joined: Mon Jun 09, 2008 2:12 pm
Location: Fargo, ND
Contact:

Re: Open in editor? dialog for html when viewing IE source

Post by RSteinwand » Mon Oct 31, 2016 4:58 pm

Thanks Albert.
Rick

User avatar
Albert Wiersch
Site Admin
Site Admin
Posts: 3222
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX
Contact:

Re: Open in editor? dialog for html when viewing IE source

Post by Albert Wiersch » Tue Nov 01, 2016 8:45 am

RSteinwand wrote:Thanks Albert.
You're welcome! I worked on this yesterday. If the file extension is unknown then CSE HTML Validator v17 will read a little of the file (up to 2048 bytes) and do some quick & simple tests to see if it looks like HTML. If it does look like HTML then it will open the file. I think this will resolve the issue you are having.
Image
Albert Wiersch

User avatar
RSteinwand
Rank VI - Professional
Rank VI - Professional
Posts: 551
Joined: Mon Jun 09, 2008 2:12 pm
Location: Fargo, ND
Contact:

Re: Open in editor? dialog for html when viewing IE source

Post by RSteinwand » Tue Nov 01, 2016 9:27 am

Cool! Are you also checking for file size? I had a snippet that showed up in CSE yesterday and it was only the html5 doctype.

Code: Select all

<!doctype html>
Since it contains "html>", I figured that was about the minimum requirement.

To be a valid web page, I would think it would need to be at least 200 bytes. What do you think?
Rick

User avatar
Albert Wiersch
Site Admin
Site Admin
Posts: 3222
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX
Contact:

Re: Open in editor? dialog for html when viewing IE source

Post by Albert Wiersch » Tue Nov 01, 2016 9:44 am

No, I'm not checking for file size but just copying the DOCTYPE should probably not trigger the clipboard feature. I'll look into that.

By the way, there is an option to only trigger the clipboard feature for documents starting with <cseclip>, which is good to use when using the Easy Copy Firefox extension. I'm not sure if the BETA version you have has that option though (I don't think it does).
Image
Albert Wiersch

Post Reply