mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-12-03 12:03:51 +08:00
Replacing carriage returns in comments with <br />'s
work item: 16596 --HG-- branch : dev
This commit is contained in:
44
src/Orchard.Specs/Comments.feature
Normal file
44
src/Orchard.Specs/Comments.feature
Normal file
@@ -0,0 +1,44 @@
|
||||
Feature: Comments
|
||||
In order to enable simple comment capabilities on my site
|
||||
As an author
|
||||
I want to allow comments to be safely posted on specific content item pages
|
||||
|
||||
Scenario: HTML markup in any given comment is encoded
|
||||
Given I have installed Orchard
|
||||
When I go to "admin/blogs/create"
|
||||
And I fill in
|
||||
| name | value |
|
||||
| Routable.Title | My Blog |
|
||||
And I hit "Save"
|
||||
And I go to "admin/blogs"
|
||||
And I follow "My Blog"
|
||||
And I follow "New Post"
|
||||
And I fill in
|
||||
| name | value |
|
||||
| Routable.Title | My Post |
|
||||
| Body.Text | Hi there. |
|
||||
And I hit "Publish Now"
|
||||
And I go to "my-blog/my-post"
|
||||
And I fill in
|
||||
| name | value |
|
||||
| CommentText | This is<br id="bad-br" />a <a href="#">link</a>. |
|
||||
And I hit "Submit Comment"
|
||||
And I am redirected
|
||||
# because the ToUrlString extension method breaks in this specific (test) environment, the returnUrl is broken...
|
||||
And I go to "my-blog/my-post"
|
||||
Then I should see "This is<br id="bad-br" />a <a href"
|
||||
And I should not see "<br id="bad-br" />"
|
||||
# another workaround because of ToUrlString in this environment
|
||||
When I go to "Users/Account/LogOff"
|
||||
And I am redirected
|
||||
And I go to "my-blog/my-post"
|
||||
And I fill in
|
||||
| name | value |
|
||||
| Name | Some One |
|
||||
| CommentText | This is<br id="bad-anon-br" />a <a href="#">link</a>. |
|
||||
And I hit "Submit Comment"
|
||||
And I am redirected
|
||||
# because the ToUrlString extension method breaks in this specific (test) environment, the returnUrl is broken...
|
||||
And I go to "my-blog/my-post"
|
||||
Then I should see "This is<br id="bad-anon-br" />a <a href"
|
||||
And I should not see "<br id="bad-anon-br" />"
|
||||
Reference in New Issue
Block a user