Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Messages with < or > are not seen as valid HTML #1562

Open
laanwj opened this issue May 3, 2022 · 0 comments
Open

Messages with < or > are not seen as valid HTML #1562

laanwj opened this issue May 3, 2022 · 0 comments
Labels
S-Minor Impairs non-critical functionality or suitable workarounds exist T-Defect Bugs, crashes, hangs, vulnerabilities, or other reported problems.

Comments

@laanwj
Copy link

laanwj commented May 3, 2022

While working on a Matrix bot that relies on the messages bridged with formatting included to IRC, we ran into the following issue: even after properly escaping HTML characters, messages with HTML-looking tags e.g. #include <test.h> were dropped.

I suspect the check here is too strict: https://github.com/matrix-org/matrix-appservice-irc/blob/develop/src/irc/formatting.ts#L173

Kvaciral added a commit to Kvaciral/ghi that referenced this issue May 6, 2022
To support Matrix as an outlet for ghi we:
-edited ghi/configuration.py to read, check and use the (optional) Matrix-settings from the .yml
-created ghi/ghimatrix.py to facilitate creating credential-files, logging onto a Matrix server and sending messages to one or more rooms on it by using the matrix-nio module
-changed some naming and matrix-specific things in most of the files
-changed the README.md en .ghy.yml.example to include the new Matrix-support
-created ghi/util.py to facilitate in a workaround for a Matrix-issue (matrix-org/matrix-appservice-irc#1562)
-added relevant exception-handlers

No changes to the config-file are necessary when using IRC.

It works quite well with server.py, haven't tested it with AWS though, but should work as well.

Closes gkrizek#27

Co-authored-by: W. J. van der Laan <[email protected]>
Kvaciral added a commit to Kvaciral/ghi that referenced this issue May 6, 2022
To support Matrix as an outlet for ghi we:
-edited ghi/configuration.py to read, check and use the (optional) Matrix-settings from the .yml
-created ghi/ghimatrix.py to facilitate creating credential-files, logging onto a Matrix server and sending messages to one or more rooms on it by using the matrix-nio module
-changed some naming and matrix-specific things in most of the files
-changed the README.md en .ghy.yml.example to include the new Matrix-support
-created ghi/util.py to facilitate in a workaround for a Matrix-issue (matrix-org/matrix-appservice-irc#1562)
-added relevant exception-handlers

No changes to the config-file are necessary when using IRC.

It works quite well with server.py, haven't tested it with AWS though, but should work as well.

Closes gkrizek#27

Co-authored-by: W. J. van der Laan <[email protected]>
@tadzik tadzik added T-Defect Bugs, crashes, hangs, vulnerabilities, or other reported problems. S-Minor Impairs non-critical functionality or suitable workarounds exist labels May 16, 2022
Kvaciral added a commit to Kvaciral/ghi that referenced this issue May 20, 2022
To support Matrix as an outlet for ghi we:
-edited ghi/configuration.py to read, check and use the (optional) Matrix-settings from the .yml
-created ghi/ghimatrix.py to facilitate creating credential-files, logging onto a Matrix server and sending messages to one or more rooms on it by using the matrix-nio module
-changed some naming and matrix-specific things in most of the files
-changed the README.md en .ghy.yml.example to include the new Matrix-support
-created ghi/util.py to facilitate in a workaround for a Matrix-issue (matrix-org/matrix-appservice-irc#1562)
-added relevant exception-handlers

No changes to the config-file are necessary when using IRC.

It works quite well with server.py, haven't tested it with AWS though, but should work as well.

Closes gkrizek#27

Co-authored-by: W. J. van der Laan <[email protected]>
Kvaciral added a commit to Kvaciral/ghi that referenced this issue May 22, 2022
To support Matrix as an outlet for ghi we:
-edited ghi/configuration.py to read, check and use the (optional) Matrix-settings from the .yml
-created ghi/ghimatrix.py to facilitate creating credential-files, logging onto a Matrix server and sending messages to one or more rooms on it by using the matrix-nio module
-changed some naming and matrix-specific things in most of the files
-changed the README.md en .ghy.yml.example to include the new Matrix-support
-created ghi/util.py to facilitate in a workaround for a Matrix-issue (matrix-org/matrix-appservice-irc#1562)
-added relevant exception-handlers

No changes to the config-file are necessary when using IRC.

It works quite well with server.py, haven't tested it with AWS though, but should work as well.

Closes gkrizek#27

Co-authored-by: W. J. van der Laan <[email protected]>
gkrizek pushed a commit to gkrizek/ghi that referenced this issue Jun 18, 2022
To support Matrix as an outlet for ghi we:
-edited ghi/configuration.py to read, check and use the (optional) Matrix-settings from the .yml
-created ghi/ghimatrix.py to facilitate creating credential-files, logging onto a Matrix server and sending messages to one or more rooms on it by using the matrix-nio module
-changed some naming and matrix-specific things in most of the files
-changed the README.md en .ghy.yml.example to include the new Matrix-support
-created ghi/util.py to facilitate in a workaround for a Matrix-issue (matrix-org/matrix-appservice-irc#1562)
-added relevant exception-handlers

No changes to the config-file are necessary when using IRC.

It works quite well with server.py, haven't tested it with AWS though, but should work as well.

Closes #27

Co-authored-by: W. J. van der Laan <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-Minor Impairs non-critical functionality or suitable workarounds exist T-Defect Bugs, crashes, hangs, vulnerabilities, or other reported problems.
Projects
None yet
Development

No branches or pull requests

2 participants