<% end %>
<% # end of information added by the bookmark owner %>
diff --git a/app/views/collections/_collection_blurb.html.erb b/app/views/collections/_collection_blurb.html.erb
index ea6ea2b066b..055927b3be7 100644
--- a/app/views/collections/_collection_blurb.html.erb
+++ b/app/views/collections/_collection_blurb.html.erb
@@ -72,8 +72,8 @@
<% end %>
<% if !collection.user_is_owner?(current_user) && collection.moderated? && !(collection.challenge && collection.challenge.signup_open) %>
- <% if (@participant ||= collection.get_participants_for_user(current_user).first) %>
- <%= link_to ts("Leave"), collection_participant_path(collection, @participant),
+ <% if (participant = collection.get_participants_for_user(current_user).first) %>
+ <%= link_to ts("Leave"), collection_participant_path(collection, participant),
data: {confirm: ts('Are you certain you want to leave this collection?')},
:method => :delete %>
+ <%= raw sanitize_field(single_comment, :comment_content, strip_images: single_comment.ultimate_parent.is_a?(AdminPost)) %>
+
<% end %>
<% if single_comment.edited_at.present? %>
diff --git a/app/views/inbox/_inbox_comment_contents.html.erb b/app/views/inbox/_inbox_comment_contents.html.erb
index 6fa2eb974fc..0cb14c5a21d 100644
--- a/app/views/inbox/_inbox_comment_contents.html.erb
+++ b/app/views/inbox/_inbox_comment_contents.html.erb
@@ -26,7 +26,6 @@
<% end %>
-<% # This feedback_comment used to be inbox_comment... not sure why %>
- <%= raw sanitize_field(feedback_comment, :comment_content) %>
+ <%= raw sanitize_field(feedback_comment, :comment_content, strip_images: feedback_comment.ultimate_parent.is_a?(AdminPost)) %>
diff --git a/app/views/layouts/_banner.html.erb b/app/views/layouts/_banner.html.erb
index 745779d2186..25115ff1f6b 100644
--- a/app/views/layouts/_banner.html.erb
+++ b/app/views/layouts/_banner.html.erb
@@ -1,25 +1,20 @@
-<% # BACK END this seems giant and messy and confusing, pls can we review?
- # FRONT END yes let us rewrite this
-%>
-<% unless current_user && current_user.try(:preference).try(:banner_seen) %>
-<% if @admin_banner && @admin_banner.active? %>
-<% unless current_user.nil? && session[:hide_banner] %>
-
If you have additional questions or information, do not hesitate to send in
diff --git a/app/views/users/sessions/_greeting.html.erb b/app/views/users/sessions/_greeting.html.erb
index 466fddbc354..4455da69ccc 100644
--- a/app/views/users/sessions/_greeting.html.erb
+++ b/app/views/users/sessions/_greeting.html.erb
@@ -1,59 +1,58 @@
-
+
+
diff --git a/app/views/works/_search_box.html.erb b/app/views/works/_search_box.html.erb
index 6b10347802a..fb1801116c3 100644
--- a/app/views/works/_search_box.html.erb
+++ b/app/views/works/_search_box.html.erb
@@ -1,11 +1,10 @@
-<%= form_for WorkSearchForm.new, as: :work_search, :url => search_works_path, :html => {:class => 'search', :id => 'search', :method => :get} do |f| %>
+<%= form_for WorkSearchForm.new, as: :work_search, url: search_works_path, html: { class: "search", id: "search", role: "search", "aria-label": t(".a11y_label"), method: :get } do |f| %>
<% end %>
diff --git a/config/locales/models/en.yml b/config/locales/models/en.yml
index 8c16681d48c..9730233f056 100644
--- a/config/locales/models/en.yml
+++ b/config/locales/models/en.yml
@@ -175,6 +175,8 @@ en:
attributes:
user_defined_tags_count:
at_most: must not add up to more than %{count}. Your work has %{value} of these tags, so you must remove %{diff} of them.
+ blocked_gifts: "%{byline} does not accept gifts."
+ blocked_your_gifts: "%{byline} does not accept gifts from you."
work/parent_work_relationships:
format: "%{message}"
models:
diff --git a/config/locales/views/en.yml b/config/locales/views/en.yml
index 5bd5682ffe5..aeeb73b7ebe 100644
--- a/config/locales/views/en.yml
+++ b/config/locales/views/en.yml
@@ -201,6 +201,38 @@ en:
canonical_format: All emails are stored in a single canonical format and common variants of the same address are not allowed (for instance, foo+whatever@bar.com will not be allowed if foo@bar.com is banned).
guest_comments: Banned email addresses cannot be used in guest comments.
page_heading: Manage Banned Emails
+ header:
+ nav:
+ activities: Activities
+ api_tokens: Manage API Tokens
+ banned_emails: Banned Emails
+ banners: Banners
+ invitations:
+ invitations: Invitations
+ new: Invite New Users
+ queue: Manage Queue
+ requests: Manage Requests
+ label: Admin
+ locales: Locales
+ posts:
+ admin_posts: Admin Posts
+ faqs: Archive FAQ
+ known_issues: Known Issues
+ news: AO3 News
+ post_news: Post AO3 News
+ wrangling_guidelines: Wrangling Guidelines
+ settings: Settings
+ skins:
+ approved: Approved Skins
+ queue: Approval Queue
+ rejected: Rejected Skins
+ skins: Skins
+ spam: Spam
+ users:
+ email_search: Bulk Email Search
+ manage: Manage Users
+ search: Find Users
+ wrangling: Tag Wrangling
passwords:
edit:
describedby:
@@ -293,6 +325,7 @@ en:
title: Block %{name}
will:
commenting: commenting or leaving kudos on your works
+ gifting: giving you gift works outside of challenge assignments and claimed prompts
intro: 'Blocking a user prevents them from:'
replying: replying to your comments anywhere on the site
will_not:
@@ -305,6 +338,7 @@ en:
cancel: Cancel
resume:
commenting: commenting or leaving kudos on your works
+ gifting: giving you gift works outside of challenge assignments and claimed prompts
intro: 'Unblocking a user allows them to resume:'
replying: replying to your comments anywhere on the site
sure_html: Are you sure you want to %{unblock} %{username}?
@@ -324,6 +358,7 @@ en:
title: Blocked Users
will:
commenting: commenting or leaving kudos on your works
+ gifting: giving you gift works outside of challenge assignments and claimed prompts
intro:
one: 'You can block up to %{block_limit} user. Blocking a user prevents them from:'
other: 'You can block up to %{block_limit} users. Blocking a user prevents them from:'
@@ -540,12 +575,40 @@ en:
other: "%{formatted_count} works"
layouts:
header:
+ collections:
+ new: New Collection
+ javascript: While we've done our best to make the core functionality of this site accessible without JavaScript, it will work better with it enabled. Please consider turning it on!
login: Log In
+ nav:
+ about: About
+ browse: Browse
+ fandoms: Fandoms
+ label: Site
+ search: Search
proxy_notice:
button: Dismiss Notice
faux_heading: 'Important message:'
point1: You are using a proxy site that is not part of the Archive of Our Own.
point2: The entity that set up the proxy site can see what you submit, including your IP address. If you log in through the proxy site, it can see your password.
+ menu:
+ menu_about:
+ about_us: About Us
+ donate: Donate or Volunteer
+ faq: FAQ
+ news: News
+ wrangling_guidelines: Wrangling Guidelines
+ menu_browse:
+ bookmarks: Bookmarks
+ collections: Collections
+ tags: Tags
+ works: Works
+ menu_fandoms:
+ all: All Fandoms
+ menu_search:
+ bookmarks: Bookmarks
+ people: People
+ tags: Tags
+ works: Works
muted:
mute: Mute
muted_items_notice_html: You have muted some users on the Archive. Some items may not be shown, and any counts may be inaccurate. You can mute or unmute users on %{muted_users_link}.
@@ -670,6 +733,9 @@ en:
random: These are some random tags used on the Archive. To find more tags, %{search_tags_link}.
random_in_collection: These are some random tags used in the collection.
search_tags: try our tag search
+ show:
+ fandom_relationship_tags: Relationship tags in this fandom
+ list_fandom_tags_html: A list of all the %{fandom_relationship_tags_link} is available.
time:
formats:
date_short_html: %a %d %b %Y
@@ -755,6 +821,26 @@ en:
submit: Create Account
wait: Please wait...
sessions:
+ greeting:
+ nav:
+ assignments: My Assignments
+ bookmarks: My Bookmarks
+ collections: My Collections
+ dashboard: My Dashboard
+ greeting: Hi, %{current_user}!
+ history: My History
+ import: Import Work
+ label: User
+ log_out: Log Out
+ new_work: New Work
+ open_doors: Open Doors
+ post: Post
+ post_draft: From Draft
+ preferences: My Preferences
+ sign_ups: My Sign-ups
+ subscriptions: My Subscriptions
+ tag_wrangling: Tag Wrangling
+ works: My Works
new:
beta_reminder:
give_feedback: give us your feedback
@@ -810,6 +896,11 @@ en:
multiple_works_restricted: Only show to registered users
restricted: Only show your work to registered users
unrestricted: Show to all
+ search_box:
+ a11y_label: Work
+ label: Work Search
+ submit: Search
+ tooltip_label: 'tip:'
show:
unposted_deletion_notice_html: This work is a draft and has not been posted. The draft will be scheduled for deletion on %{deletion_date}.
work_approved_children:
diff --git a/features/admins/admin_works.feature b/features/admins/admin_works.feature
index eeebd918748..acfd6ca877b 100644
--- a/features/admins/admin_works.feature
+++ b/features/admins/admin_works.feature
@@ -227,6 +227,7 @@ Feature: Admin Actions for Works, Comments, Series, Bookmarks
When I am logged in as a "policy_and_abuse" admin
And I view the work "The One Where Neal is Awesome"
And I follow "Comments (1)"
+ And it is currently 1 second from now
And I follow "Not Spam"
Then I should see "Hide Comments (2)"
And I should not see "Not Spam"
diff --git a/features/bookmarks/bookmark_create.feature b/features/bookmarks/bookmark_create.feature
index 72d1d8efe72..e56da0f057c 100644
--- a/features/bookmarks/bookmark_create.feature
+++ b/features/bookmarks/bookmark_create.feature
@@ -108,6 +108,18 @@ Scenario: extra commas in bookmark form (Issue 2284)
And I press "Create"
Then I should see "created"
+Scenario: Bookmark notes do not display images
+ Given I am logged in as "bookmarkuser"
+ And I post the work "Some Work"
+ When I follow "Bookmark"
+ And I fill in "Notes" with "Fantastic!"
+ And I press "Create"
+ And all indexing jobs have been run
+ Then I should see "Bookmark was successfully created"
+ When I go to the bookmarks page
+ Then I should not see the image "src" text "http://example.com/icon.svg"
+ And I should see "Fantastic!"
+
Scenario: bookmark added to moderated collection has flash notice only when not approved
Given the following activated users exist
| login | password |
diff --git a/features/collections/collection_participants.feature b/features/collections/collection_participants.feature
index 84d1222b182..868faa442a1 100644
--- a/features/collections/collection_participants.feature
+++ b/features/collections/collection_participants.feature
@@ -66,3 +66,12 @@
And I follow "Join"
Then I should see "You are now a member of Such a nice collection"
When I am in the default browser
+
+Scenario: Collection member should see correct button text
+ Given I have the moderated collection "ModeratedCollection"
+ And I have the moderated collection "ModeratedCollectionTheSequel"
+ And I am logged in as "sam"
+ And I have joined the collection "ModeratedCollection" as "sam"
+ When I am on the collections page
+ Then I should see "Leave" exactly 1 time
+ And I should see "Join" exactly 1 time
\ No newline at end of file
diff --git a/features/comments_and_kudos/add_comment.feature b/features/comments_and_kudos/add_comment.feature
index 782700c82f0..c4613c550a8 100644
--- a/features/comments_and_kudos/add_comment.feature
+++ b/features/comments_and_kudos/add_comment.feature
@@ -133,7 +133,7 @@ Scenario: Comment threading, comment editing
And I fill in "Comment" with "B's improved comment (edited)"
And I press "Update"
Then 0 emails should be delivered to "User_A"
-
+
Scenario: Try to post an invalid comment
When I am logged in as "author"
@@ -180,6 +180,17 @@ Scenario: Set preference and receive comment notifications of your own comments
And "commenter" should be emailed
And 1 email should be delivered to "commenter"
+Scenario: Work comment displays images
+
+ Given the work "Generic Work"
+ And I am logged in as "commenter"
+ And I visit the new comment page for the work "Generic Work"
+ When I fill in "Comment" with "Fantastic!"
+ And I press "Comment"
+ Then I should see "Comment created!"
+ And I should see "Fantastic!"
+ And I should see the image "src" text "http://example.com/icon.svg"
+
Scenario: Try to post a comment with a < angle bracket before a linebreak, without a space before the bracket
Given the work "Generic Work"
@@ -194,7 +205,7 @@ Scenario: Try to post a comment with a < angle bracket before a linebreak, witho
And I press "Comment"
Then I should see "Comment created!"
-Scenario: Try to post a comment with a < angle bracket before a linebreak, with a space before the bracket
+Scenario: Try to post a comment with a < angle bracket before a linebreak, with a space before the bracket
Given the work "Generic Work"
And I am logged in as "commenter"
diff --git a/features/comments_and_kudos/comments_adminposts.feature b/features/comments_and_kudos/comments_adminposts.feature
index da130cc1d0e..a5060948daa 100644
--- a/features/comments_and_kudos/comments_adminposts.feature
+++ b/features/comments_and_kudos/comments_adminposts.feature
@@ -135,3 +135,14 @@ Feature: Commenting on admin posts
When I follow "Edit Post"
Then I should see "No one can comment"
# TODO: Test that the other options aren't available/selected in a non-brittle way
+
+ Scenario: Admin post comment does not display images
+ Given I have posted an admin post
+ And I am logged in as "regular"
+ And I go to the admin-posts page
+ And I follow "Default Admin Post"
+ When I fill in "Comment" with "Hi!"
+ And I press "Comment"
+ Then I should see "Comment created!"
+ And I should not see the image "src" text "http://example.com/icon.svg"
+ And I should see "Hi!"
diff --git a/features/comments_and_kudos/inbox.feature b/features/comments_and_kudos/inbox.feature
index ee7d85bc285..545e6665d3b 100644
--- a/features/comments_and_kudos/inbox.feature
+++ b/features/comments_and_kudos/inbox.feature
@@ -159,3 +159,12 @@ Feature: Get messages in the inbox
And I go to the homepage
Then I should see "sewwiththeflo on Cat Thor's Bizarre Adventure"
And I should see "Thank you! Please go to bed."
+
+ Scenario: Reply to a comment on an admin post that contains an image
+ Given I have posted an admin post
+ And a comment "My comment" by "sewwiththeflo" on the admin post "Default Admin Post"
+ And a reply "My reply " by "unbeatablesg" on the admin post "Default Admin Post"
+ When I am logged in as "sewwiththeflo"
+ And I go to the homepage
+ Then I should see "My reply"
+ And I should not see ""
diff --git a/features/gift_exchanges/challenge_giftexchange.feature b/features/gift_exchanges/challenge_giftexchange.feature
index 424f0c209ac..13c95d5d5bd 100644
--- a/features/gift_exchanges/challenge_giftexchange.feature
+++ b/features/gift_exchanges/challenge_giftexchange.feature
@@ -641,3 +641,37 @@ Feature: Gift Exchange Challenge
And I uncheck "exchange_collection (recip)"
And I press "Post"
Then I should see "For recip."
+
+ Scenario: If a work is connected to an assignment for a user who blocked the gifter,
+ user is still automatically added as a gift recipient. The recipient
+ remains attached even if the work is later disconnected from the assignment.
+ Given basic tags
+ And the user "recip" exists and is activated
+ And the user "recip" allows gifts
+ And the user "recip" has blocked the user "gifter"
+ And I am logged in as "gifter"
+ And I have an assignment for the user "recip" in the collection "exchange_collection"
+ When I fulfill my assignment
+ Then I should see "For recip."
+ When I follow "Edit"
+ And I uncheck "exchange_collection (recip)"
+ And I press "Post"
+ Then I should see "For recip."
+
+ Scenario: A user can explicitly give a gift to a user who blocked the gifter if
+ the work is connected to an assignment. The recipient remains attached even if
+ the work is later disconnected from the assignment.
+ Given basic tags
+ And the user "recip" exists and is activated
+ And the user "recip" allows gifts
+ And the user "recip" has blocked the user "gifter"
+ And I am logged in as "gifter"
+ And I have an assignment for the user "recip" in the collection "exchange_collection"
+ When I start to fulfill my assignment
+ And I fill in "Gift this work to" with "recip"
+ And I press "Post"
+ Then I should see "For recip."
+ When I follow "Edit"
+ And I uncheck "exchange_collection (recip)"
+ And I press "Post"
+ Then I should see "For recip."
diff --git a/features/other_a/abuse_report.feature b/features/other_a/abuse_report.feature
index e325ed64718..01636e32302 100644
--- a/features/other_a/abuse_report.feature
+++ b/features/other_a/abuse_report.feature
@@ -59,3 +59,15 @@ Feature: Filing an abuse report
And I press "Submit"
And I should see "Your report was submitted to the Policy & Abuse team. A confirmation message has been sent to the email address you provided."
And 1 email should be delivered
+
+ Scenario: File a report containing images
+
+ Given I am logged in as "otheruser"
+ And basic languages
+ When I follow "Policy Questions & Abuse Reports"
+ And I fill in "Description of the content you are reporting (required)" with "This is wrong"
+ And I fill in "Brief summary of Terms of Service violation (required)" with 'Hi'
+ And I fill in "Link to the page you are reporting (required)" with "http://www.archiveofourown.org/works"
+ And I press "Submit"
+ Then 1 email should be delivered
+ And the email should not contain ""
diff --git a/features/other_a/gift.feature b/features/other_a/gift.feature
index ec39358f45f..8d77e3b5171 100644
--- a/features/other_a/gift.feature
+++ b/features/other_a/gift.feature
@@ -337,3 +337,57 @@ Feature: Create Gifts
And I should not see "by gifter for giftee1"
When I view the work "Rude Gift"
Then I should not see "For giftee1."
+
+ Scenario: Can't give a gift to a user who has blocked you
+ Given the user "giftee1" has blocked the user "gifter"
+ When I am logged in as "gifter"
+ And I post the work "Rude Gift" as a gift for "giftee1"
+ Then I should see "Sorry! We couldn't save this work because: giftee1 does not accept gifts from you."
+ And 0 emails should be delivered to "giftee1@example.com"
+
+ Scenario: Can't gift an existing work to a user who has blocked you
+ Given the user "giftee1" has blocked the user "gifter"
+ And I press "Post"
+ And I follow "Edit"
+ And I give the work to "giftee1"
+ When I press "Post"
+ Then I should see "Sorry! We couldn't save this work because: giftee1 does not accept gifts from you."
+
+ Scenario: Can't gift a work whose co-creator is blocked by recipient
+ Given I coauthored the work "Collateral" as "gifter" with "gifter2"
+ And the user "giftee1" has blocked the user "gifter2"
+ And I edit the work "Collateral"
+ And I give the work to "giftee1"
+ When I press "Post"
+ Then I should see "Sorry! We couldn't save this work because: giftee1 does not accept gifts."
+
+ Scenario: Only see one error message is shown if gifts are disabled and user is blocked*
+ Given the user "giftee1" disallows gifts
+ And the user "giftee1" has blocked the user "gifter"
+ When I am logged in as "gifter"
+ And I post the work "Rude Gift" as a gift for "giftee1"
+ Then I should see "Sorry! We couldn't save this work because:"
+ And I should see "giftee1 does not accept gifts."
+ And I should not see "giftee1 does not accept gifts from you."
+
+ Scenario: A user can refuse previous gifts from user after blocking them
+ Given I am logged in as "gifter"
+ And I post the work "Rude Gift" as a gift for "giftee1"
+ When I am logged in as "giftee1"
+ And I go to my gifts page
+ Then I should see "Rude Gift"
+ When I go to my blocked users page
+ And I fill in "blocked_id" with "gifter"
+ And I press "Block"
+ And I press "Yes, Block User"
+ Then I should see "You have blocked the user gifter."
+ When I go to my gifts page
+ And it is currently 1 second from now
+ And I follow "Refuse Gift"
+ Then I should see "This work will no longer be listed among your gifts."
+ And I should not see "Rude Gift"
+ When I follow "Refused Gifts"
+ Then I should see "Rude Gift"
+ And I should not see "by gifter for giftee1"
+ When I view the work "Rude Gift"
+ Then I should not see "For giftee1."
diff --git a/features/other_a/help.feature b/features/other_a/help.feature
index 4563f6ae07d..da05dc690bc 100644
--- a/features/other_a/help.feature
+++ b/features/other_a/help.feature
@@ -35,7 +35,7 @@ Feature: Help
Scenario: Asked to log in if trying to access the first login page as guest
When I go to the first login help page
- Then I should see "Sorry, you don't have permission"
+ Then I should be on the login page
Given I am logged in
When I go to the first login help page
diff --git a/features/other_a/pseuds.feature b/features/other_a/pseuds.feature
index 50379fcfc78..077c1407e00 100644
--- a/features/other_a/pseuds.feature
+++ b/features/other_a/pseuds.feature
@@ -118,6 +118,18 @@ Scenario: Manage pseuds - add, edit
And I should see "I wanted to add another fancy name"
And I should not see "My new name (editpseuds)"
+Scenario: Pseud descriptions do not display images
+
+ Given I am logged in as "myself"
+ And I go to my pseuds page
+ When I follow "Edit"
+ And I fill in "Description" with "Fantastic!"
+ And I press "Update"
+ Then I should see "Pseud was successfully updated."
+ When I follow "Back To Pseuds"
+ Then I should not see the image "src" text "http://example.com/icon.svg"
+ And I should see "Fantastic!"
+
Scenario: Comments reflect pseud changes immediately
Given the work "Interesting"
diff --git a/features/other_b/errors.feature b/features/other_b/errors.feature
index a7dff1b681b..7bc6c78696d 100644
--- a/features/other_b/errors.feature
+++ b/features/other_b/errors.feature
@@ -1,6 +1,5 @@
@errors
-Feature: We need to do something when someone asks for something we don't have
-Some pages with non existent things raise errors
+Feature: Error messages should work
Scenario: Some pages with non existent things raise errors
Given the user "KnownUser" exists and is activated
@@ -24,3 +23,12 @@ Some pages with non existent things raise errors
And visiting "/tags/UnknownTag/works" should fail with a not found error
When I am logged in as "wranglerette"
And visiting "/tags/NonexistentTag/edit" should fail with a not found error
+
+ Scenario: Error messages should be able to display '^'
+ Given I am logged in as a random user
+ And I post the work "Work 1"
+ And I view the work "Work 1"
+ And I follow "Edit Tags"
+ When I fill in "Fandoms" with "^"
+ And I press "Post"
+ Then I should see "Sorry! We couldn't save this work because: Tag name '^' cannot include the following restricted characters: , ^ * < > { } = ` , 、 \ %"
diff --git a/features/other_b/fandoms.feature b/features/other_b/fandoms.feature
index 8fba205aae1..06dcf699f66 100644
--- a/features/other_b/fandoms.feature
+++ b/features/other_b/fandoms.feature
@@ -34,6 +34,7 @@ Feature: There is a list of unassigned Fandoms
And I add the fandom "Steven Universe" to the character "Sapphire (Steven Universe)"
And I am logged in as "author"
And I post the work "Stronger than you" with fandom "Steven Universe" with character "Ruby (Steven Universe)" with second character "Sapphire (Steven Universe)" with relationship "Ruby/Sapphire (Steven Universe)"
- When I go to the "Steven Universe" fandom relationship page
+ When I go to the "Steven Universe" tag page
+ And I follow "Relationship tags in this fandom"
Then I should see "Ruby (Steven Universe)"
And I should see "Sapphire (Steven Universe)"
diff --git a/features/other_b/series.feature b/features/other_b/series.feature
index c598bf05ed4..f1c822734ca 100644
--- a/features/other_b/series.feature
+++ b/features/other_b/series.feature
@@ -44,7 +44,9 @@ Feature: Create and Edit Series
Scenario: Works in a series have series navigation
Given I am logged in as "author"
And I post the work "Sweetie Belle" as part of a series "Ponies"
+ And it is currently 1 second from now
And I post the work "Starsong" as part of a series "Ponies"
+ And it is currently 1 second from now
And I post the work "Rainbow Dash" as part of a series "Ponies"
When I view the series "Ponies"
And I follow "Rainbow Dash"
@@ -184,6 +186,22 @@ Feature: Create and Edit Series
Then I should see "penguins30"
When I follow "Next"
Then I should see "penguins0"
+
+ Scenario: Series show page with many works
+ Given I am logged in as "author"
+ And I post the work "Caesar" as part of a series "Salads"
+ And I post the work "Chicken" as part of a series "Salads"
+ And I post the work "Pasta" as part of a series "Salads"
+ And I post the work "Spring" as part of a series "Salads"
+ And I post the work "Chef" as part of a series "Salads"
+ And there are 3 works per series page
+ When I view the series "Salads"
+ Then I should see "Caesar"
+ And I should see "Chicken"
+ And I should see "Pasta"
+ When I follow "Next"
+ Then I should see "Spring"
+ And I should see "Chef"
Scenario: Removing self as co-creator from co-created series when you are the only creator of a work in the series.
Given I am logged in as "sun"
diff --git a/features/other_b/skin.feature b/features/other_b/skin.feature
index f1724c7fe81..a13dc513fdb 100755
--- a/features/other_b/skin.feature
+++ b/features/other_b/skin.feature
@@ -12,7 +12,7 @@ Feature: Non-public site and work skins
And I should see "text-decoration: blink;"
And I should see "(No Description Provided)"
And I should see "by skinner"
- But I should see "Use"
+ But I should see a button with text "Use"
And I should see "Delete"
And I should see "Edit"
And I should not see "Stop Using"
@@ -40,7 +40,6 @@ Feature: Non-public site and work skins
Given I am logged in as "skinner"
And I create the skin "my blinking skin" with css "#title { text-decoration: blink;}"
Then I should see "my blinking skin"
- And I should see "Use"
When I press "Use"
Then I should see "#title {" in the page style
And I should see "text-decoration: blink;" in the page style
diff --git a/features/other_b/support.feature b/features/other_b/support.feature
index d8733c4e088..2f31585e9ca 100644
--- a/features/other_b/support.feature
+++ b/features/other_b/support.feature
@@ -46,4 +46,14 @@ Feature: Filing a support request
And I press "Send"
Then I should see "Your message was sent to the Archive team - thank you!"
And 1 email should be delivered
-
+
+ Scenario: Submit a request containing an image
+
+ Given I am logged in as "puzzled"
+ And basic languages
+ When I follow "Support & Feedback"
+ And I fill in "Brief summary" with "Just a brief note"
+ And I fill in "Your question or problem" with 'Hi'
+ And I press "Send"
+ Then 1 email should be delivered
+ And the email should not contain ""
diff --git a/features/prompt_memes_b/challenge_promptmeme_posting_fills.feature b/features/prompt_memes_b/challenge_promptmeme_posting_fills.feature
index 38691a84848..e15e8e7c5fb 100755
--- a/features/prompt_memes_b/challenge_promptmeme_posting_fills.feature
+++ b/features/prompt_memes_b/challenge_promptmeme_posting_fills.feature
@@ -542,3 +542,20 @@ Feature: Prompt Meme Challenge
And I fill in "Gift this work to" with "prompter, bystander"
And I press "Post"
Then I should see "bystander does not accept gifts."
+
+ Scenario: A creator can give a gift to a user who has blocked them if the work is connected to a claim of a non-anonymous prompt belonging to the recipient
+
+ Given I have Battle 12 prompt meme fully set up
+ And the user "prompter" exists and is activated
+ And the user "prompter" has blocked the user "gifter"
+ And "prompter" has signed up for Battle 12 with combination A
+ When I am logged in as "gifter"
+ And I claim a prompt from "Battle 12"
+ And I start to fulfill my claim
+ And I fill in "Gift this work to" with "prompter"
+ And I press "Post"
+ Then I should see "For prompter."
+ When I follow "Edit"
+ And I uncheck "Battle 12 (prompter)"
+ And I press "Post"
+ Then I should see "For prompter."
diff --git a/features/step_definitions/collection_steps.rb b/features/step_definitions/collection_steps.rb
index c01aba626fa..6daa52bf489 100644
--- a/features/step_definitions/collection_steps.rb
+++ b/features/step_definitions/collection_steps.rb
@@ -117,6 +117,13 @@
step %{I should see "Updated #{name}"}
end
+Given "I have joined the collection {string} as {string}" do |title, login|
+ collection = Collection.find_by(title: title)
+ user = User.find_by(login: login)
+ FactoryBot.create(:collection_participant, pseud: user.default_pseud, collection: collection, participant_role: "Member")
+ visit collections_path
+end
+
### WHEN
When /^I set up (?:a|the) collection "([^"]*)"(?: with name "([^"]*)")?$/ do |title, name|
diff --git a/features/step_definitions/generic_steps.rb b/features/step_definitions/generic_steps.rb
index 7f53e72c35c..db802cc0f50 100644
--- a/features/step_definitions/generic_steps.rb
+++ b/features/step_definitions/generic_steps.rb
@@ -271,3 +271,7 @@ def assure_xpath_not_present(tag, attribute, value, selector)
Time.zone = zone
page.body.should =~ /#{Regexp.escape(Time.zone.now.zone)}/
end
+
+Then "I should see {string} exactly {int} time(s)" do |string, int|
+ expect(page).to have_content(string).exactly(int)
+end
diff --git a/features/step_definitions/series_steps.rb b/features/step_definitions/series_steps.rb
index 998d7769e95..333aea5c9d4 100644
--- a/features/step_definitions/series_steps.rb
+++ b/features/step_definitions/series_steps.rb
@@ -2,6 +2,10 @@
visit series_path(Series.find_by(title: series))
end
+Given "there are {int} works per series page" do |amount|
+ allow(WillPaginate).to receive(:per_page).and_return(amount)
+end
+
When /^I add the series "([^\"]*)"$/ do |series_title|
check("series-options-show")
if Series.find_by(title: series_title)
diff --git a/features/support/paths.rb b/features/support/paths.rb
index 95df95966e3..01a4bdc2fd7 100644
--- a/features/support/paths.rb
+++ b/features/support/paths.rb
@@ -285,8 +285,6 @@ def path_to(page_name)
edit_tag_path(Tag.find_by(name: Regexp.last_match(1)))
when /^the wrangling tools page$/
tag_wranglings_path
- when /^the "(.*)" fandom relationship page$/i
- fandom_path($1)
when /^the new external work page$/i
new_external_work_path
when /^the external works page$/i
diff --git a/features/users/blocking.feature b/features/users/blocking.feature
index d136e427c9a..d305915dd3f 100644
--- a/features/users/blocking.feature
+++ b/features/users/blocking.feature
@@ -121,3 +121,17 @@ Feature: Blocking
| superadmin |
| policy_and_abuse |
| support |
+
+ Scenario: Users are told about blocking effects on gift-giving
+ Given the user "pest" exists and is activated
+ And I am logged in as "blocker"
+ When I go to my blocked users page
+ Then I should see "giving you gift works"
+ Given the user "unblocker" has blocked the user "improving"
+ And I am logged in as "unblocker"
+ When I go to my blocked users page
+ Then I should see "improving"
+ And I should see "giving you gift works"
+ When I follow "Unblock"
+ Then I should see a "Yes, Unblock User" button
+ And I should see "giving you gift works"
diff --git a/lib/html_cleaner.rb b/lib/html_cleaner.rb
index f2636d00a16..a70e19517ec 100644
--- a/lib/html_cleaner.rb
+++ b/lib/html_cleaner.rb
@@ -2,17 +2,21 @@
module HtmlCleaner
# If we aren't sure that this field hasn't been sanitized since the last sanitizer version,
# we sanitize it before we allow it to pass through (and save it if possible).
- def sanitize_field(object, fieldname)
+ def sanitize_field(object, fieldname, strip_images: false)
return "" if object.send(fieldname).nil?
sanitizer_version = object.try("#{fieldname}_sanitizer_version")
- if sanitizer_version && sanitizer_version >= ArchiveConfig.SANITIZER_VERSION
- # return the field without sanitizing
- object.send(fieldname)
- else
- # no sanitizer version information, so re-sanitize
- sanitize_value(fieldname, object.send(fieldname))
- end
+ sanitized_field =
+ if sanitizer_version && sanitizer_version >= ArchiveConfig.SANITIZER_VERSION
+ # return the field without sanitizing
+ object.send(fieldname)
+ else
+ # no sanitizer version information, so re-sanitize
+ sanitize_value(fieldname, object.send(fieldname))
+ end
+
+ sanitized_field = strip_images(sanitized_field) if strip_images
+ sanitized_field
end
# yank out bad end-of-line characters and evil msword curly quotes
diff --git a/public/403.html b/public/403.html
index af8b230854c..1c057e36a9d 100644
--- a/public/403.html
+++ b/public/403.html
@@ -29,76 +29,76 @@
Your IP address has been blocked from accessing the Archive of Our Own. These blocks are generally long-term. If you believe you have been blocked by mistake, please contact us.
If you are receiving this error repeatedly, please contact Support. In the form, please include a link to the page you're trying to reach and how you're trying to reach this page.
To combat bots, we are currently banning IP addresses that post too many works in a short time period. If you see this page repeatedly please pause a while between posting works. If you are banned, you will be unable to access the Archive. Access will be restored 24 hours after the ban started.
The default is: 'Lucida Grande', 'Lucida Sans Unicode', 'GNU Unifont', Verdana, Helvetica, sans-serif
+
The default is: 'Lucida Grande', 'Lucida Sans Unicode', Verdana, Helvetica, sans-serif, 'GNU Unifont'
Put any font name in here, and if it's installed on your computer, it'll work for you. If you use several different devices, specify some fall-back fonts, with commas in between the names, in case one of your devices doesn't have the first font.
You can use either single or double quotation marks around fonts with multi-word names, e.g. "Lucida Grande" or 'Lucide Sans Unicode'.
diff --git a/public/javascripts/application.js b/public/javascripts/application.js
index 9d5d9066e8c..84aa957879a 100644
--- a/public/javascripts/application.js
+++ b/public/javascripts/application.js
@@ -361,7 +361,6 @@ function setupDropdown(){
'data-target': '#'
});
$j('.dropdown').find('.menu').addClass("dropdown-menu");
- $j('.dropdown').find('.menu').children('li').attr("role", "menuitem");
}
// Accordion-style collapsible widgets
diff --git a/public/javascripts/bootstrap/bootstrap-dropdown.js b/public/javascripts/bootstrap/bootstrap-dropdown.js
index 716b39924d6..c8c92ab2e7e 100644
--- a/public/javascripts/bootstrap/bootstrap-dropdown.js
+++ b/public/javascripts/bootstrap/bootstrap-dropdown.js
@@ -19,9 +19,10 @@
* OTWARCHIVE DEVS:
*
* When updating to the newest version, make sure to include the
- * customizations from LINES 61-69 AND 177-183 and UPDATE THIS
- * MESSAGE with the new line numbers. These lines ensure proper
- * behavior when both JS and CSS hover are used for menus
+ * customizations from LINES 62-70, 103, AND 177-184 and UPDATE THIS
+ * MESSAGE with the new line numbers. These lines ensure the code works
+ * without the ARIA menu role and ensure proper behavior when both JS and
+ * CSS hover are used for menus.
* ========================================================== */
@@ -99,7 +100,7 @@
return $this.click()
}
- $items = $('[role=menu] li:not(.divider):visible a', $parent)
+ $items = $('ul.menu li:not(.divider):visible a', $parent)
if (!$items.length) return
@@ -173,13 +174,13 @@
.on('click.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })
.on('click.dropdown-menu', function (e) { e.stopPropagation() })
.on('click.dropdown.data-api' , toggle, Dropdown.prototype.toggle)
- .on('keydown.dropdown.data-api', toggle + ', [role=menu]' , Dropdown.prototype.keydown)
+ .on('keydown.dropdown.data-api', toggle + ', ul.menu' , Dropdown.prototype.keydown)
.on('mouseenter', '.dropdown', function (e) {
var $parent = $(this)
if ($parent.siblings('.open').length) {
$parent.children('ul').hide()
- }
+ }
})
.on('mouseleave', '.dropdown', function (e) { $(this).children('ul').removeAttr('') })
-}(window.jQuery);
\ No newline at end of file
+}(window.jQuery);
diff --git a/public/javascripts/bootstrap/bootstrap-dropdown.min.js b/public/javascripts/bootstrap/bootstrap-dropdown.min.js
index 45ab63130c2..e017f9598ae 100644
--- a/public/javascripts/bootstrap/bootstrap-dropdown.min.js
+++ b/public/javascripts/bootstrap/bootstrap-dropdown.min.js
@@ -1 +1 @@
-!function(e){"use strict";function r(){e(t).each(function(){i(e(this)).removeClass("open")})}function i(t){var n=t.attr("data-target"),r;if(!n){n=t.attr("href");n=n&&/#/.test(n)&&n.replace(/.*(?=#[^\s]*$)/,"")}r=n&&e(n);if(!r||!r.length)r=t.parent();return r}var t="[data-toggle=dropdown]",n=function(t){var n=e(t).on("click.dropdown.data-api",this.toggle);e("html").on("click.dropdown.data-api",function(){n.parent().removeClass("open")})};n.prototype={constructor:n,toggle:function(t){var n=e(this),s,o;if(n.is(".disabled, :disabled"))return;s=i(n);o=s.hasClass("open");r();if(o){s.children("ul").hide();n.blur()}else{s.toggleClass("open").children("ul").removeAttr("style");n.focus()}n.focus();return false},keydown:function(n){var r,s,o,u,a,f;if(!/(38|40|27)/.test(n.keyCode))return;r=e(this);n.preventDefault();n.stopPropagation();if(r.is(".disabled, :disabled"))return;u=i(r);a=u.hasClass("open");if(!a||a&&n.keyCode==27){if(n.which==27)u.find(t).focus();return r.click()}s=e("[role=menu] li:not(.divider):visible a",u);if(!s.length)return;f=s.index(s.filter(":focus"));if(n.keyCode==38&&f>0)f--;if(n.keyCode==40&&f0&&s--,40==t.keyCode&&s