-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #240 from pulibrary/i236-change-banner-text
Render HTML from banner config
- Loading branch information
Showing
5 changed files
with
22 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<% if banner_content %> | ||
<div id="banner"> | ||
<%= @banner_title %> | ||
<%= @banner_body %> | ||
<%= sanitize @banner_title %> | ||
<%= sanitize @banner_body %> | ||
</div> | ||
<% end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,13 @@ | ||
--- | ||
development: | ||
title: Welcome to the development site | ||
body: This is a message for development | ||
test: | ||
title: Welcome to the test site | ||
body: This is a message for test | ||
title: Welcome to the <i>test</i> site | ||
body: This is a <b>test</b> <a href="mailto:[email protected]">message.</a> | ||
staging: | ||
title: Welcome to the staging site | ||
body: This is a message for staging | ||
title: Welcome to Princeton Data Commons Discovery (Staging)! | ||
body: PRDS is proud to share our new website for the discovery and sharing of research data. Have a look around and <a href="mailto:[email protected]">let us know what you think.</a> | ||
production: | ||
title: Welcome to the production site | ||
body: This is a message for production | ||
title: Welcome to Princeton Data Commons Discovery! | ||
body: PRDS is proud to share our new website for the discovery and sharing of research data. Have a look around and <a href="mailto:[email protected]">let us know what you think.</a> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,4 +31,13 @@ | |
visit '/catalog/78348' | ||
expect(page).to have_css '#banner' | ||
end | ||
|
||
it "renders html tags in the banner" do | ||
visit '/catalog/78348' | ||
expect(page).not_to have_content "<i>test</i>" | ||
expect(page.find("div#banner h1 i").text).to eq "test" | ||
expect(page).not_to have_content "<b>test</b>" | ||
expect(page.find("div#banner p b").text).to eq "test" | ||
expect(page).to have_link "message", href: "mailto:[email protected]" | ||
end | ||
end |