diff options
author | techknowlogick <techknowlogick@gitea.io> | 2019-12-17 16:34:11 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-12-17 16:34:11 -0500 |
commit | 590d56dbb355a499b2f59d9a6ffa4887ea33c96b (patch) | |
tree | 37933f95c29661c80e0ba40751b7e7cf448a32c1 /web_src/js/index.js | |
parent | 601b0cf4c19ba6e75a8df6a73beb5f58f462ad46 (diff) | |
download | gitea-590d56dbb355a499b2f59d9a6ffa4887ea33c96b.tar.gz gitea-590d56dbb355a499b2f59d9a6ffa4887ea33c96b.zip |
switch to fomantic-ui (#9374)
Diffstat (limited to 'web_src/js/index.js')
-rw-r--r-- | web_src/js/index.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/web_src/js/index.js b/web_src/js/index.js index b35f806598..8600acc95c 100644 --- a/web_src/js/index.js +++ b/web_src/js/index.js @@ -3252,7 +3252,10 @@ function initTopicbar() { const last = viewDiv.children('a').last(); for (let i = 0; i < topicArray.length; i++) { - $(`<a class="ui repo-topic small label topic" href="${suburl}/explore/repos?q=${topicArray[i]}&topic=1">${topicArray[i]}</a>`).insertBefore(last); + const link = $('<a class="ui repo-topic small label topic"></a>'); + link.attr('href', `${suburl}/explore/repos?q=${encodeURIComponent(topicArray[i])}&topic=1`); + link.text(topicArray[i]); + link.insertBefore(last); } } editDiv.css('display', 'none'); @@ -3298,7 +3301,7 @@ function initTopicbar() { label: 'ui small label' }, apiSettings: { - url: `${suburl}/api/v1/topics/search?q={query}`, + url: `${suburl}/api/v1/topics/search?q={encodeURIComponent(query)}`, throttle: 500, cache: false, onResponse(res) { |