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

Caractère ' become ' to Slack #38

Closed
ZerooCool opened this issue Apr 11, 2019 · 8 comments
Closed

Caractère ' become ' to Slack #38

ZerooCool opened this issue Apr 11, 2019 · 8 comments

Comments

@ZerooCool
Copy link

ZerooCool commented Apr 11, 2019

Text from issue redmine :
Contenu vérifié après avoir récupéré l'accès.

Text posted to Slack
Contenu vérifié après avoir récupéré l'accès.

@ZerooCool
Copy link
Author

ZerooCool commented Apr 11, 2019

I presume the escape come from ERB::Util.html_escape function because

Do you have an idea to correct this problem?
(3 issues already open in total, for this problem.)

@alexandermeindl
Copy link
Collaborator

This should be fixed in master now.

@alexandermeindl
Copy link
Collaborator

alexandermeindl commented Dec 31, 2019

Hi @ZerooCool,
can you check, if the problem is fixed with Slack? I do not have Slack to test it.

@ZerooCool
Copy link
Author

Ok, i look that, ASAP.

@shisyamo
Copy link

shisyamo commented Jan 7, 2020

Hi @alexandermeindl,
Excuse me.

Thank you very much for your correction.
I'm thinking this plug-in to apply.

But when the plug-in to which this correction was applied is carried out, an error occurs and the following log is output.

RuntimeError (can't modify frozen String):

plugins/redmine_messenger/app/models/messenger.rb:15:in `gsub!'
plugins/redmine_messenger/app/models/messenger.rb:15:in `markup_format'
plugins/redmine_messenger/lib/redmine_messenger/patches/issue_patch.rb:113:in `send_messenger_mention_url'
plugins/redmine_messenger/lib/redmine_messenger/patches/issue_patch.rb:48:in `send_messenger_create'
app/controllers/issues_controller.rb:133:in `create'
lib/redmine/sudo_mode.rb:65:in `sudo_mode'

Because it's output with "frozen String".

  text.gsub! ('&', '&')
  text.gsub! ('<', '&lt;')
  text.gsub! ('>', '&gt;')

The gsub! which is so I think a text object is because it's frozen at the time of function execution.
Can't I have the advice which doesn't show solution method?

The execution environment is as follows.

Redmine version 4.1.0.stable
Ruby version 2.4.9-p362 (2019-10-02) [x86_64-linux-gnu]
Rails version 5.2.4.1

@alexandermeindl
Copy link
Collaborator

Hi @shisyamo
thanks for reporting this! I fixed it with my last commit. It would be nice, if you could check it again.

@shisyamo
Copy link

shisyamo commented Jan 8, 2020

Hi @alexandermeindl,

I checked the operation by the last commit.

An error doesn't occur and a plug-in has started.
It could also be confirmed that a message is sent to robotchat.

I'm thankful for quick correspondence.

@ZerooCool
Copy link
Author

Ok, work for me, too !
Resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants