summaryrefslogtreecommitdiffstats
path: root/templates/repo/wiki
diff options
context:
space:
mode:
authormrsdizzie <info@mrsdizzie.com>2020-05-24 06:41:33 -0400
committerGitHub <noreply@github.com>2020-05-24 11:41:33 +0100
commitae55dc7a6ba9c08c4a8e0750acf89f9ad3fabffb (patch)
tree05da207d167e29d796f440b5dd9fdda866dbc004 /templates/repo/wiki
parent814ca9ffea229f55f1f69b34d9a7f84054115669 (diff)
downloadgitea-ae55dc7a6ba9c08c4a8e0750acf89f9ad3fabffb.tar.gz
gitea-ae55dc7a6ba9c08c4a8e0750acf89f9ad3fabffb.zip
Fix images in wiki edit preview (#11546)
Make sure wiki editor sets wiki to true so gitea renders it as a wiki page. Also change the context data attr for edit form. This looks wrong but everywhere else in our code assumes the urlPrefix to be just the repo url when rendering and manually adds /wiki to the rendered url regardless. Fixes #11540
Diffstat (limited to 'templates/repo/wiki')
-rw-r--r--templates/repo/wiki/new.tmpl2
1 files changed, 1 insertions, 1 deletions
diff --git a/templates/repo/wiki/new.tmpl b/templates/repo/wiki/new.tmpl
index 276ea54f3a..002a36de96 100644
--- a/templates/repo/wiki/new.tmpl
+++ b/templates/repo/wiki/new.tmpl
@@ -21,7 +21,7 @@
<a class="item" data-tab="preview">{{.i18n.Tr "preview"}}</a>
</div>
<div class="field">
- <textarea class="js-quick-submit" id="edit_area" name="content" data-id="wiki-{{.title}}" data-url="{{.Repository.APIURL}}/markdown" data-context="{{.RepoLink}}/wiki" required>{{if .PageIsWikiEdit}}{{.content}}{{else}}{{.i18n.Tr "repo.wiki.welcome"}}{{end}}</textarea>
+ <textarea class="js-quick-submit" id="edit_area" name="content" data-id="wiki-{{.title}}" data-url="{{.Repository.APIURL}}/markdown" data-context="{{.RepoLink}}" required>{{if .PageIsWikiEdit}}{{.content}}{{else}}{{.i18n.Tr "repo.wiki.welcome"}}{{end}}</textarea>
</div>
<div class="field">
<input name="message" placeholder="{{.i18n.Tr "repo.wiki.default_commit_message"}}">