Skip to content

Commit

Permalink
#820 urlencode id's and change delimiter
Browse files Browse the repository at this point in the history
  • Loading branch information
vancamti committed Apr 26, 2023
1 parent e51581a commit be1d14a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion atramhasis/templates/tree.jinja2
Expand Up @@ -240,7 +240,7 @@
}
function expandPath(id) {
var ids = id.split('.');
var ids = id.split('|');
currentIds = ids;
var childrenArray = root.children;
for (i = 0; i < (ids.length - 1); ++i) {
Expand Down
3 changes: 2 additions & 1 deletion atramhasis/views/views.py
@@ -1,4 +1,5 @@
import os
import urllib

from pyramid.httpexceptions import HTTPFound
from pyramid.i18n import TranslationStringFactory
Expand Down Expand Up @@ -350,7 +351,7 @@ def create_treeid(parent_tree_id, concept_id):
if parent_tree_id is None:
return str(concept_id)
else:
return parent_tree_id + "." + str(concept_id)
return parent_tree_id + "|" + urllib.parse.quote(str(concept_id))

@view_config(route_name='scheme_root', renderer='atramhasis:templates/concept.jinja2')
def results_tree_html(self):
Expand Down

0 comments on commit be1d14a

Please sign in to comment.