@Félix How to you want to colab? I'm an independent hacker so I haven't joint developed before. If you want to setup a github project, my user name is: briancdowning
I've written a pydantic model and written a Django app to take an instance of the model and create the html. Here is pydantic model and an instance of it: ---------------------------------------------------- from typing import List, Optional from pydantic import BaseModel class NodeWrapper(BaseModel): headline: str body: str htmlId: int tooltip: Optional[str] = None children: Optional[List['NodeWrapper']] = [] NodeWrapper.model_rebuild() #section 1 -> section 1.1 -> section 1.1.1 section1p1p1Node = NodeWrapper( headline="Section 1.1.1", body="This is even more deeply nested content under Section 1.1.1.", htmlId=1, ) section1p1Node = NodeWrapper( headline="Section 1.1", body="This is nested content under Section 1.1.", htmlId=2, children=[section1p1p1Node], ) section1Node = NodeWrapper( headline="Section 1", body="This is the content under Section 1.", htmlId=3, children=[section1p1Node], tooltip="Random tip: Rotate the knob gently to start calibration.", ) ------------------------------------------------------------------- Currently, my plan is to run the body text through a markup lib to create the html. I'm planning on making the field htmlId of the model optional and then auto generate the id in my code. Currently, I have everything written as a Django App. I'll need to repackage to run in a plugin On Sunday, September 7, 2025 at 8:15:38 PM UTC-4 Edward K. Ream wrote: > On Sun, Sep 7, 2025 at 1:25 PM Félix <[email protected]> wrote: > >> @Edward About security with relation to a html file content. >> > > Thanks for this detailed response. > > I think in an office setting, an executable, or a pdf file or >> microsoft-office document containing a malicious macro to be run is far >> worse. >> > >> Unlike running a python script, (or any other scripting environment like >> a macro in excel , etc.) a browser running a web page /html script cannot >> arbitrarily read/write files on your hard drive. Even if it the browser's >> executable is run as admin, the browser will bring up warning and >> permissions dialogs. That is because browsers do not open/load nor follow >> links with the "file://:" protocol. You have to start up a web server so >> that the protocol is "http://localhost/blablabla/index.html" for the >> browser to load/open files.. >> >> The only thing you can do locally with an html file opened directly from >> the filesystem on your hard-disk is : rendering that html file 'alone'. - >> That is why it then has to be self-contained. Meaning that all the css >> styling and javascript scripts have to be *inline *in the file and >> cannot be imported in the html header from other script.js and style.css >> files like on a regular web page. > > > Does that mean that scripts in local html files (including onLoad) never > run? That would be jolly. > > Malevolent webpages and/or html does not have to do with typical security >> concerns (file read/write on your hard-drive) but instead have to do with >> mimicking graphical design and layout of the html page, (like for your own >> bank, and have your real name and personal info printed on it that they >> automatically got somewhere else because its public info) to have the user >> confidently put in credentials. (to enter a fake sweepstake, or fake login, >> etc...) >> >> So in conclusion, opening a local html file in your browser is not a >> security concern in itself. >> > > That's good to know! > > Félix > -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion visit https://groups.google.com/d/msgid/leo-editor/b3813f3a-a40c-4679-b8d9-0614cc4ddde8n%40googlegroups.com.
