Page 1 of 1

Is there a library for translating an html string to a css string and vice versa?

Posted: 24 Jan 2023, 21:38
by autocart
Hi all,

as you all probably are aware of, there are different rules for escaping certain characters in an html context compared to a css context.

I am wondering is there a library for ahk 2 that supports conversion or translation from one kind of string to the other?
If it only exists for ahk 1 then that would still be interesting as well.

Thank you all. Kind regards, a.

Re: Is there a library for translating an html string to a css string and vice versa?

Posted: 24 Jan 2023, 23:48
by Chunjee

Re: Is there a library for translating an html string to a css string and vice versa?

Posted: 25 Jan 2023, 05:59
by autocart
@Chunjee, thank you, that is a start.
However, it says on these pages:
No other characters are escaped. To escape additional characters use a third-party library.
Respectively:
No other HTML entities are unescaped. To unescape additional HTML entities use a dedicated third-party library.
Thus, do you (or someone else here) know of a more sophisticated third-party library?

Besides, CSS escape sequences are not handled in the linked biga.ahk library at all, as far as I saw.
Do you (or someone else here) have one for that too?

Many, many thanks in advance. Regards, a.

Re: Is there a library for translating an html string to a css string and vice versa?

Posted: 25 Jan 2023, 12:20
by Chunjee
I don't know one but you can possibly make some minor changes to handle additional characters

Regards, a.

Re: Is there a library for translating an html string to a css string and vice versa?

Posted: 25 Jan 2023, 12:21
by autocart
:thumbup: