Skip to content

Commit

Permalink
Fix bug where / was breaking URLs, replace with -
Browse files Browse the repository at this point in the history
  • Loading branch information
Jordan Evans committed Jun 15, 2011
1 parent 40bb632 commit 7f8e4d3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions railroad/railroad/viewhosts/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,9 @@ def parse():
# except Exception:
obj_path = '%sobjects.cache' % data_path
obj = nagios_objects.ObjectParser(obj_path, ('hostgroup'))
# / in group names break urls, replace with - which are safer
for group in obj['hostgroup']:
group['alias'] = group['alias'].replace('/', '-')

return stat, obj

Expand Down

0 comments on commit 7f8e4d3

Please sign in to comment.