This is an automated email from the ASF dual-hosted git repository.
gcruz pushed a commit to branch gc/8420
in repository https://gitbox.apache.org/repos/asf/allura.git
The following commit(s) were added to refs/heads/gc/8420 by this push:
new dab4401 fixup! 8420 added nofollow to links generated by Markdown
syntax and side menu in wiki
dab4401 is described below
commit dab4401d40c97fde897c4b4694dfc11aa82648e0
Author: Guillermo Cruz <[email protected]>
AuthorDate: Wed Mar 23 12:53:38 2022 -0600
fixup! 8420 added nofollow to links generated by Markdown syntax and side
menu in wiki
---
Allura/allura/app.py | 11 ++++-------
ForgeWiki/forgewiki/wiki_main.py | 19 ++++++++-----------
2 files changed, 12 insertions(+), 18 deletions(-)
diff --git a/Allura/allura/app.py b/Allura/allura/app.py
index 6069dfb..e2e34db 100644
--- a/Allura/allura/app.py
+++ b/Allura/allura/app.py
@@ -664,16 +664,14 @@ class Application:
links = []
if self.permissions and has_access(c.project, 'admin')():
links.append(
- SitemapEntry('Permissions', admin_url + 'permissions',
extra_html_attrs={'rel': 'nofollow'}))
+ SitemapEntry('Permissions', admin_url + 'permissions'))
if force_options or len(self.config_options) > 3:
links.append(
- SitemapEntry('Options', admin_url + 'options',
className='admin_modal',
- extra_html_attrs={'rel': 'nofollow'}))
+ SitemapEntry('Options', admin_url + 'options',
className='admin_modal'))
links.append(
- SitemapEntry('Rename', admin_url + 'edit_label',
className='admin_modal',
- extra_html_attrs={'rel': 'nofollow'}))
+ SitemapEntry('Rename', admin_url + 'edit_label',
className='admin_modal'))
if len(self._webhooks) > 0:
- links.append(SitemapEntry('Webhooks', admin_url + 'webhooks',
extra_html_attrs={'rel': 'nofollow'}))
+ links.append(SitemapEntry('Webhooks', admin_url + 'webhooks'))
return links
@LazyProperty
@@ -695,7 +693,6 @@ class Application:
label='Delete Everything',
url=self.admin_url + 'delete',
className='admin_modal',
- extra_html_attrs={'rel': 'nofollow'},
)
def handle_message(self, topic, message):
diff --git a/ForgeWiki/forgewiki/wiki_main.py b/ForgeWiki/forgewiki/wiki_main.py
index a7b4a0e..617e537 100644
--- a/ForgeWiki/forgewiki/wiki_main.py
+++ b/ForgeWiki/forgewiki/wiki_main.py
@@ -248,13 +248,12 @@ The wiki uses [Markdown](%s) syntax.
if has_create_access:
links += [SitemapEntry('Create Page', self.url +
'create_wiki_page/',
ui_icon=g.icons['add'],
- className='admin_modal',
- extra_html_attrs={'rel': 'nofollow'})]
+ className='admin_modal')]
if not admin_menu:
links += [SitemapEntry(''),
- SitemapEntry('Wiki Home', self.url,
className='wiki_home', extra_html_attrs={'rel': 'nofollow'})]
- links += [SitemapEntry('Browse Pages', self.url + 'browse_pages/',
extra_html_attrs={'rel': 'nofollow'}),
- SitemapEntry('Browse Labels', self.url + 'browse_tags/',
extra_html_attrs={'rel': 'nofollow'})]
+ SitemapEntry('Wiki Home', self.url,
className='wiki_home')]
+ links += [SitemapEntry('Browse Pages', self.url + 'browse_pages/'),
+ SitemapEntry('Browse Labels', self.url + 'browse_tags/')]
discussion = self.config.discussion
pending_mod_count = M.Post.query.find({
'discussion_id': discussion._id,
@@ -265,7 +264,7 @@ The wiki uses [Markdown](%s) syntax.
links.append(
SitemapEntry(
'Moderate', discussion.url() + 'moderate',
ui_icon=g.icons['moderate'],
- small=pending_mod_count, extra_html_attrs={'rel':
'nofollow'}))
+ small=pending_mod_count))
if not c.user.is_anonymous() and not admin_menu:
subscribed = M.Mailbox.subscribed(app_config_id=self.config._id)
subscribe_action = 'unsubscribe' if subscribed else 'subscribe'
@@ -274,19 +273,17 @@ The wiki uses [Markdown](%s) syntax.
'' if subscribed else ' to wiki')
subscribe_url = '{}#toggle-{}'.format(self.url + 'subscribe',
subscribe_action)
links.append(SitemapEntry(None))
- links.append(SitemapEntry(subscribe_title, subscribe_url,
ui_icon=g.icons['mail'],
- extra_html_attrs={'rel': 'nofollow'}))
+ links.append(SitemapEntry(subscribe_title, subscribe_url,
ui_icon=g.icons['mail']))
if not admin_menu:
links += [SitemapEntry(''),
SitemapEntry('Formatting Help', '/nf/markdown_syntax',
- extra_html_attrs={'target': '_blank',
'rel': 'nofollow'})]
+ extra_html_attrs={'target': '_blank'})]
return links
def admin_menu(self, skip_common_menu=False):
links = [SitemapEntry('Set Home',
self.admin_url + 'home',
- className='admin_modal',
- extra_html_attrs={'rel': 'nofollow'})]
+ className='admin_modal')]
if not self.show_left_bar and not skip_common_menu:
links += self.create_common_wiki_menu(has_create_access=True,
admin_menu=True)