summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/assets/stylesheets/application.css2
-rw-r--r--app/assets/stylesheets/wiki_syntax.css38
-rw-r--r--app/assets/stylesheets/wiki_syntax_detailed.css38
-rw-r--r--app/models/user.rb4
-rw-r--r--lib/redmine/wiki_formatting/common_mark/sanitization_filter.rb2
-rw-r--r--test/unit/lib/redmine/wiki_formatting/common_mark/sanitization_filter_test.rb12
6 files changed, 64 insertions, 32 deletions
diff --git a/app/assets/stylesheets/application.css b/app/assets/stylesheets/application.css
index 69e343eee..d207a1c8d 100644
--- a/app/assets/stylesheets/application.css
+++ b/app/assets/stylesheets/application.css
@@ -317,7 +317,7 @@ div + .drdn-items {border-top:1px solid #ccc;}
width:100%;
height:24px;
display:inline-block;
- padding:3px 18px 3px 6px;
+ padding:1.5px 18px 3px 6px;
border-radius:3px;
border:1px solid #ccc;
margin:0 !important;
diff --git a/app/assets/stylesheets/wiki_syntax.css b/app/assets/stylesheets/wiki_syntax.css
index d326a3293..41e780c75 100644
--- a/app/assets/stylesheets/wiki_syntax.css
+++ b/app/assets/stylesheets/wiki_syntax.css
@@ -1,19 +1,33 @@
@font-face {
- font-family: "Noto Sans";
- src: url("/NotoSans-VariableFont_wdth,wght.woff2") format("woff2");
- font-weight: 100 900;
- font-stretch: 75% 125%;
- font-style: normal;
- font-display: swap;
+ font-family: "Noto Sans";
+ src: url("/NotoSans-Regular.woff2") format("woff2");
+ font-weight: 400;
+ font-style: normal;
+ font-display: swap;
}
@font-face {
- font-family: "Noto Sans";
- src: url("/NotoSans-Italic-VariableFont_wdth,wght.woff2") format("woff2");
- font-weight: 100 900;
- font-stretch: 75% 125%;
- font-style: italic;
- font-display: swap;
+ font-family: "Noto Sans";
+ src: url("/NotoSans-Bold.woff2") format("woff2");
+ font-weight: 700;
+ font-style: normal;
+ font-display: swap;
+}
+
+@font-face {
+ font-family: "Noto Sans";
+ src: url("/NotoSans-Italic.woff2") format("woff2");
+ font-weight: 400;
+ font-style: italic;
+ font-display: swap;
+}
+
+@font-face {
+ font-family: "Noto Sans";
+ src: url("/NotoSans-BoldItalic.woff2") format("woff2");
+ font-weight: 700;
+ font-style: italic;
+ font-display: swap;
}
:root {
diff --git a/app/assets/stylesheets/wiki_syntax_detailed.css b/app/assets/stylesheets/wiki_syntax_detailed.css
index 7d7c30f53..e90279641 100644
--- a/app/assets/stylesheets/wiki_syntax_detailed.css
+++ b/app/assets/stylesheets/wiki_syntax_detailed.css
@@ -1,19 +1,33 @@
@font-face {
- font-family: "Noto Sans";
- src: url("/NotoSans-VariableFont_wdth,wght.woff2") format("woff2");
- font-weight: 100 900;
- font-stretch: 75% 125%;
- font-style: normal;
- font-display: swap;
+ font-family: "Noto Sans";
+ src: url("/NotoSans-Regular.woff2") format("woff2");
+ font-weight: 400;
+ font-style: normal;
+ font-display: swap;
}
@font-face {
- font-family: "Noto Sans";
- src: url("/NotoSans-Italic-VariableFont_wdth,wght.woff2") format("woff2");
- font-weight: 100 900;
- font-stretch: 75% 125%;
- font-style: italic;
- font-display: swap;
+ font-family: "Noto Sans";
+ src: url("/NotoSans-Bold.woff2") format("woff2");
+ font-weight: 700;
+ font-style: normal;
+ font-display: swap;
+}
+
+@font-face {
+ font-family: "Noto Sans";
+ src: url("/NotoSans-Italic.woff2") format("woff2");
+ font-weight: 400;
+ font-style: italic;
+ font-display: swap;
+}
+
+@font-face {
+ font-family: "Noto Sans";
+ src: url("/NotoSans-BoldItalic.woff2") format("woff2");
+ font-weight: 700;
+ font-style: italic;
+ font-display: swap;
}
:root {
diff --git a/app/models/user.rb b/app/models/user.rb
index 4ce63f809..c544ca64c 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -89,8 +89,8 @@ class User < Principal
:after_remove => Proc.new {|user, group| group.user_removed(user)}
has_many :changesets, :dependent => :nullify
has_one :preference, :dependent => :destroy, :class_name => 'UserPreference'
- has_one :atom_token, lambda {where "action='feeds'"}, :class_name => 'Token'
- has_one :api_token, lambda {where "action='api'"}, :class_name => 'Token'
+ has_one :atom_token, lambda {where "#{table.name}.action='feeds'"}, :class_name => 'Token'
+ has_one :api_token, lambda {where "#{table.name}.action='api'"}, :class_name => 'Token'
has_one :email_address, lambda {where :is_default => true}, :autosave => true
has_many :email_addresses, :dependent => :delete_all
belongs_to :auth_source
diff --git a/lib/redmine/wiki_formatting/common_mark/sanitization_filter.rb b/lib/redmine/wiki_formatting/common_mark/sanitization_filter.rb
index cdefc372b..046866e05 100644
--- a/lib/redmine/wiki_formatting/common_mark/sanitization_filter.rb
+++ b/lib/redmine/wiki_formatting/common_mark/sanitization_filter.rb
@@ -86,7 +86,7 @@ module Redmine
node = env[:node]
return unless node.name == "a" || node.name == "li"
return unless node.has_attribute?("id")
- return if node.name == "a" && node["id"] =~ /\Afnref-\d+\z/
+ return if node.name == "a" && node["id"] =~ /\Afnref(-\d+){1,2}\z/
return if node.name == "li" && node["id"] =~ /\Afn-\d+\z/
node.remove_attribute("id")
diff --git a/test/unit/lib/redmine/wiki_formatting/common_mark/sanitization_filter_test.rb b/test/unit/lib/redmine/wiki_formatting/common_mark/sanitization_filter_test.rb
index d3956e802..bf7e5655f 100644
--- a/test/unit/lib/redmine/wiki_formatting/common_mark/sanitization_filter_test.rb
+++ b/test/unit/lib/redmine/wiki_formatting/common_mark/sanitization_filter_test.rb
@@ -47,10 +47,14 @@ if Object.const_defined?(:CommonMarker)
end
def test_should_support_footnotes
- input = %(<a href="#fn-1" id="fnref-1">foo</a>)
- assert_equal input, filter(input)
- input = %(<ol><li id="fn-1">footnote</li></ol>)
- assert_equal input, filter(input)
+ [
+ %(<a href="#fn-1" id="fnref-1">foo</a>),
+ %(<a href="#fn-1" id="fnref-1-2">foo</a>),
+ %(<ol><li id="fn-1">footnote</li></ol>),
+ ].each do |input|
+ assert_equal input, filter(input)
+ assert_equal input, filter(input)
+ end
end
def test_should_remove_invalid_ids