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

HTMLFilter's plain text does not preserve whitespace #2095

Open
mkrautz opened this issue Jan 31, 2016 · 7 comments
Open

HTMLFilter's plain text does not preserve whitespace #2095

mkrautz opened this issue Jan 31, 2016 · 7 comments
Labels
feature-request This issue or PR deals with a new feature

Comments

@mkrautz
Copy link
Contributor

mkrautz commented Jan 31, 2016

/cc @LuaMilkshake

Per #2069 (comment)

Because we use QString::simplified(), whitespace at the beginning and end of a plain text message (a text message sent on a server with allowhtml=false) will be dropped by the HTMLFilter class.

Also, multiple whitespace characters will be converted into a single space character.

@warrenspe
Copy link

This has been the bane of my team's usage of mumble - whenever we're sending code (python, in particular) across to one another we need to resort to skype as mumble renders it unusable without fixing a bunch of truncated whitespace

@Krzmbrzl
Copy link
Member

@warrenspe with Mumble 1.4 or newer we have Markdown support. Just paste your code in code markup and it should be sent as-is.
Note that there won't be any syntax highlighting or the like - but it should resolve the whitespace issue

@warrenspe
Copy link

Hey @Krzmbrzl

Thanks for the reply! Does markdown function when allowhtml=false? I've tried it with triple backticks but it seems to come through verbatim.

If not, I can always reconfigure to turn html back on; but it is a bit unfortunate to need to remember to use backticks. Is a workaround, at least though

Thanks!

@Krzmbrzl
Copy link
Member

No the Markdown gets converted to HTML before sending, so by disabling HTML, you also disable Markdown

@warrenspe
Copy link

Hey @Krzmbrzl ,

One last question for you - I've reenabled html on my murmur server, but I seem to having some trouble getting markdown working; I've tried the usual culprits for code blocks (4 space indentation and triple backticks) but neither seem to generate a code block for me. Would you be able to point me in the right direction on how murmur is expecting a code block to be formatted?

@Krzmbrzl
Copy link
Member

The server does not expect anything. This feature is entirely client-side. Is the client you are using >= 1.4?

@warrenspe
Copy link

Ah, that explains that. I hadn't updated the client to 1.4 yet, sorry!

@Kissaki Kissaki added feature-request This issue or PR deals with a new feature and removed enhancement labels Apr 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request This issue or PR deals with a new feature
Projects
None yet
Development

No branches or pull requests

4 participants