Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Sanitize project name parameter. #2

Merged
merged 1 commit into from

2 participants

@axiom

As per the Flowdock API documentation the project argument is
sanitized by replacing illegal characters with a blank space.

@axiom axiom Sanitize project name parameter.
As per the Flowdock API documentation [1] the project argument is
sanitized by replacing illegal characters with a blank space.

[1]: https://www.flowdock.com/api/team-inbox
9fde53f
@mutru mutru merged commit ce45a67 into flowdock:master
@mutru

Looks good, thanks @axiom.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on May 24, 2012
  1. @axiom

    Sanitize project name parameter.

    axiom authored
    As per the Flowdock API documentation [1] the project argument is
    sanitized by replacing illegal characters with a blank space.
    
    [1]: https://www.flowdock.com/api/team-inbox
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/flowdock_listener.rb
View
2  lib/flowdock_listener.rb
@@ -70,7 +70,7 @@ def send_message!(subject, body)
:from_name => @user_name,
:subject => subject,
:content => body,
- :project => @project_name,
+ :project => @project_name.gsub(/[^\w\s]/,' '),
:link => @url
}
Something went wrong with that request. Please try again.