We help IT Professionals succeed at work.

UX escape sequence

versailles
versailles asked
on
I would like to know if there would be an escape sequence in HTML that would permit to call an external agent and run a command?
Comment
Watch Question

Most Valuable Expert 2017
Distinguished Expert 2019

Commented:
No, HTML is a document layout and specification language. For security reasons it is ringfenced and can only interact with the host computer in limited ways.

Using JavaScript you can call services on remote computers but you cannot run anything on the host computer.

Not sure if this is answering your question.
versailleschercheur libre

Author

Commented:
Hmmmm. Can I call "localhost" with JavaScript?
How do I call a service on a foriegn host?
Deep thx.
Most Valuable Expert 2017
Distinguished Expert 2019

Commented:
Can you rather explain what you are trying to do - if we understand what it is you want to do we can better assist.

localhost is just an address if you can browse to it you can call it with JavaScript - whether you will get a response is dependent on a number of factors such as whether it is in the same domain / port / protocol range and whether remote service supports CORS - but we can deal with those issues when we know more about your question.
versailleschercheur libre

Author

Commented:
I just want to build what I call a smart-gateway between the web and me. As an OPES (RFC 3835). It scans the data flow and can modify it - either by my own rules, or by commands received through escape sequences.

so for example if the &&name; sequence means enter my name, my gateway will print "hello, &&name;!" as "Hello, Versailles!". But I wish this to print as Ă©hello! &&name;! if I have turned down the gaetway. This is a basic example.

Best & thanks.
Most Valuable Expert 2017
Distinguished Expert 2019

Commented:
And you want this to run out of a web page? Doesn't sound right - why not use something like NodeJS?
versailleschercheur libre

Author

Commented:
This is an OPES level project.  Runs the same in every protocol, format, etc. This is semantic network layer (works on the datagram content). I need a universal sequence to enter it. I can invent one (ex. &&xxx;) but I figure out that HTML is the less flexible modern format and the most used and documented one. So an escape sequence which would be plain HTML should probly work for every protocol and people not having my OPES could easily build on the same sequence for their own development.

Best
Most Valuable Expert 2017
Distinguished Expert 2019
Commented:
Ok as I understand it OPES services sit between a data provider and a consumer and act on the exchanged data in some way such that the data being exchanged is potentially altered / filtered / redirected in some way

Your question is about escape sequences in HTML that trigger an agent. This is where things get fuzzy - if you are exchanging structured information then HTML is an odd choice - XML (of which HTML is a derivative) would be better - but based on your last two posts I am not clear on what it is you are wanting to do and why HTML is considered as an option.
versailleschercheur libre

Author

Commented:
Thank you for your concern. The point is that I am not exchanging information in HTTP, SMTPn etc.  I am to receive any fully end to end traffic. Except that at the fringe I filter it to look for an escape sequence I replace by what the escape sequence is for - but other not having my filter will also receive that traffic. It will be received by an application. That application can use HTTP. In this case the reader may :

- either receives it as noise. He needs to be clearly explained what the noise is about. So the escape sequence must be easily identifiable and not confusable with something already existing in the standard.
- or want to handle it in his own way.  In such a case it might be nice to make it something already existing and permitting to achieve it, like calling a local or remote web server. Either it is simple enough and can be accepted in every context, or it is not and the sending edge must adapt the out-flow when it is an HTML page.

Right now I am just trying to select an escape sequence. &&xxx; seems nice. Or @@@; which does not seem to be confusable (from Google searches)
Most Valuable Expert 2017
Distinguished Expert 2019

Commented:
Ok not 100% with you on what you are doing  - but if I get the gist of it you are looking for a way to embed information in an existing stream in such a way that it is
a) recognisable
b) does not interfere or more importantly get confused with something that is naturally part of that stream

Is that correct?
versailleschercheur libre

Author

Commented:
Correct. In streams that may use HTML. Where I am confused is for example when I am on Slack or Gmail (it is HTML) but I can click and it tells my computer to display my directory for me to attach a file.
Thanks for the concern
Most Valuable Expert 2017
Distinguished Expert 2019

Commented:
but I can click and it tells my computer to display my directory for me to attach a file.
That is just HTML's file input control - it allows you to browse for a file and attach it to an input control which is then sent when the form is posted. It is wrapped up pretty tightly - you can't get in there and doing anything other than the default behaviour.

Not sure how that is relevant though as that is a user interaction - does not come into play otherwise.
versailleschercheur libre

Author

Commented:
Thank you again for your concern. I am going to try another approach, in keeping in mind what you wrote. May be starting with a perl module and seeing what it happens with different tries. Thanks a lot!
versailleschercheur libre

Author

Commented:
Complex issue. The help received was great. It will help me consideing the solution from another point of view.
Most Valuable Expert 2017
Distinguished Expert 2019

Commented:
You are welcome.