Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issue with new url helper #56

Closed
kim95748 opened this issue May 4, 2018 · 1 comment
Closed

issue with new url helper #56

kim95748 opened this issue May 4, 2018 · 1 comment

Comments

@kim95748
Copy link
Contributor

kim95748 commented May 4, 2018

Just tested the new UrlHelper with the following Article Topic (all the letters on my English keyboard):

--`~1!2@3#4$5%6^7&8*9(0)-_=+qQwWeErRtTyYuUiIoOpP[{]}\|aAsSdDfFgGhHjJkKlL;:'"zZxXcCvVbBnNmM,<.>/?--

and it creates the following url slug which does not work:

--`~1!2@3#4$5%6-7&8*9(0)--+qqwweerrttyyuuiioopp[{-}-|aassddffgghhjjkkll;:'"zzxxccvvbbnnmm-<->-?--

If I role back to the original UrlHelper that was created by the guys that run the SO site I get the following url slug that works properly:

123456-7890-qqwweerrttyyuuiioopp-aassddffgghhjjkkllzzxxcc

I think we need to rollback to the original UrlHelper as it has been tested on millions of stackoverflow pages & has also been tested with many other keyboards / languages.

smabuk added a commit to smabuk/CoreWiki that referenced this issue May 5, 2018
…ed characters rather than reverting to the old code
smabuk added a commit to smabuk/CoreWiki that referenced this issue May 5, 2018
…ed characters rather than returning to the old method.
csharpfritz added a commit that referenced this issue May 5, 2018
@csharpfritz
Copy link
Owner

Thanks for identifying this issue... and thanks to @smabuk for the fix!

csharpfritz added a commit that referenced this issue Jul 5, 2018
* Upgrade package.json and _Layout.cshtml to point to Bootstrap 4.1.1

* Page Selector using a cookie and javascript

* Fix issue #56 by updating the new code to strip any unwanted characters rather than returning to the old method.

* Now resetting the page number when you change the page size

* Added gitattributes

* now ignoring vscode folder

* Fixed missing topic information to correct #54

* Now allowing edits to the topic name

* Added unit test and tuned UrlHelpers

* Removed indent-size as requested in #59

* Merged unit test projects

* Added ArticleHistory

* Incrementing version fixed

* Ignoring App_Data

* WIP - Attempting to seed ArticleHistory

* Fixed seed data issue for ArticleHistory (#172)

* Started work on the history page

* Completed diff functionality

* Completed the diff functionality
csharpfritz added a commit that referenced this issue Jul 19, 2018
* Update README.md

* Issue #14 make sure *.db files are not checkin to git repo by adding it to the .gitignore

* Implemented the Comments #8
Fix bug in Edit

* Updated with our friends at the VSLS booth

* Added estimated reading time

* Adding TagHelper for Gravatar

* Added link to the GitHub repository in the footer

* RSS feed implemented

* Updated to ASP.NET Core 2.1

* added httpContextAccessor

* Fixed URL references

* set details page title to article topic

also some minor clean up

* Added upload file button and javascript to update content field with files content

* Added file upload button to Edit page, to support markdown file uploads

* Fixed issues related to Edit page

* Removed indent size

* Fixed CSS formatting of file input

* Display a 'Article not found' page for invalid article URLs

* Show a 'Page not found' page for all non-Article 404s

* Update in project references

* Fix Edit/Save continues not working

* Basic search functionality

* Make sure csproj has the latest 2.1 Sqlite packages

* Scaffold Identity UI with CoreWikiIdentityContext and CoreWikiUser.
Roll back files changed under wwwroot (it overwrites site.sj for example)

* Change db connection string to place the file alongside the main db

* Modify Startup.cs to bring it up to 2.1.

* Authentication
* https
* Cookie policy

Clean up white space

* EFCore Migrations

The generated database code requires Entity Framework Core Migrations. Run the following commands:
1. dotnet ef migrations add CreateIdentitySchema -c CoreWikiIdentityContext -o .\Areas\Identity\Data\Migrations
2. dotnet ef database update -c CoreWikiIdentityContext

* ManageNavClass
Manage case where only 3rd-part accounts are used (not local ones)
Update to Bootstrap 4

* Update _layout to include login and privacy consent

* Replace btn-default which no longer exists in Bootstrap 4 with btn-outline-primary

* Replace glyphicons with font-awesone icons

* Replace @Html.Partial with <partial name="_StatusMessage" model="Model.StatusMessage" /> as recommended by the compiler

* Update _CookieConsentPartial javascript to set hidden element as "hidden" class is no longer a Bootstratp item

* Add standard Privacy page

* Point some pages  to "/" as we don't use "/Index" as the home in this project

* Update launchSettings to launch on ssl, listening on 2 ports

* Add pagination to search results; Additional Article row refactoring

* Make SearchResult generic so it can be used with other models like Comments
Also change partial rendering to be async

* Removed reference to 2.1 RTM NuGet repository

* Change the Logout to return directly to "/" instead of using the default method

* Fixes #87

* Small sizing/spacing fix

* _ThemePartial to implement Light and Dark themes

* Updated layout to include themes

* Surround markdown textarea with notheme class

* More specific site fix for markdown editor

* Fixed #93 and also fixed the styles for the _ThemePartial element in the footer.

* Added Disqus option for comments

* Revert JavaScript to older syntax to allow it to work in Edge Mobile and other earlier browsers

* Change to use Bootstrap theming (intended use from when the project was first moved to v4)

* Fix class attribute

This was causing errors in the page.

* Prevent duplicate entries

This fixes #81 by disabling the Submit button if the form is valid.

* Updated estimated read time to use moment.js

* Removed the original code and just left the code to switch css files

* Added Seeder for IdentityDB

* fix(launchSettings): set sslPort to valid port of IIS Express

* build(vscode): remove gitignore of vscode workspace settings, add tasks/launch settings

* feat(manifest): add CW icons for android/ios, links in _Layout, manifest.json

* Make sure cookie doesn't expire at the end of the session and secure it

* Updated with default empty values for Microsoft Account and prevented configuration of Microsoft Account if no configuration is defined

* Fixed Copyright layout class bug

* Clean up code that was added with RSS feed but then never used.

Change how the Url from the appsettings is load so that now it will auto reload.

Added Typed Application settings

* Replaced use of the word 'is' with 'are'

* Added Mads Kristensen's PWA nuget pkg

* Re-introduced missing RSS link tag

* Fixed compiler warnings

* Adapted #88 - no longer using RegEx or Split to count words

* Enhanced All Artticles Page Articles

* Search and LatestChanges UI Grid enhancements

* Trying the ASP.NET Core 2.1.1 early access code

* Enhanced page routes to satisfy 'Change route definition (#27)'

* Added AppInsights and Twitter authentication

* Fixed issue External Login Bug #115

* Fixed Twitter login issues

* Updated App Insights and Snickler nuget packages

* Added creation of new stub articles from links embedded in an Article

* Fixed bug #118

* Fixed 'Should not be able to delete the Home Page' #120

* Added test project to solution

* Added several failing test cases for word count helper

* Counts words and excludes any elements which don't contain a letter

* Removed code which causes allocations and still passes test cases

* Fix typo in WordCount function summary

* Make the WordCount function match the javascript editor word count result

* Extension method for TagBuilder to aid in future accessibility modifications

* Improve accessibility for paginator links

* Added property to set maximum amount of page links to show.
Adjusted comment docs accordingly.

* Added helper functions to create specific tags

* Added function to calculate paginator display range

* Added functions to generate first, previous, next and last buttons

* Added function to generate paginator links using the display range calulation

* Generate the paginator links using the new functions

* Added Humanizer package reference

* Updated Search page to use Humanizer package

* Removed Pluralize method as it is no longer needed

* Re-introduced aria-spans for page numbers in the pager

* Removed extra semicolon

* Change ports for dev server

On OSX, `dotnet run` fails with "port in use". Port 5000 is used by
Apple Time Capsule, Port 5001 used by some VPN software (e.g. Cisco
AnyConnect)

* Make buttons uniform across the site.

- The buttons on the Add & Edit pages blended into the upload control.
- Bootstrap doesn't have a "btn-default" class, swap for "btn-outline-primary" which is used elsewhere in the site.

* Localize main CoreWiki pages

* Allow creation of Article from 404 page.

404 page contains a create link.  Create get() modified to check if
the slug exists or not.  If it does, redirect to the Edit page.  If
it does not, show the Create page with the Topic pre-filled with an
attempt to "de-slugify" it.

Closes #135, #122

* Add ability to change a Topic

We don't want existing links to be broken so if the Topic of an Article
is changed, which means the Slug has changed, record the old Slug so
we can look it up if an Article request would normally 404.

* Fixed aria links and created single function for both clickable and non-clickable links

* Update contributing.md with Pull Request steps.

Cribbed from a few open source projects, lays out how to do a PR
using rebase to keep everything nice and clean.

Closes #72

* Remove server header from default Kestrel server

* Added recommended security headers

Set HSTS to 365 days and apply to subdomains as well
Prevent MIME sniffing with X-Content-Type-Options header
Don't leak referer information to external sites for privacy
Enable builtin reflective XSS protection in modern browsers
Set X-Frame-Options to protect against iframe clickjacking

* Remove extra server header information

* Prepare for content security policy implementation

Awaiting on madskristensen/WebEssentials.AspNetCore.ServiceWorker#30

* Fixed localization on ArticleNotFound

* fix home page edit bug #145

Was seeding database with "HomePage" instead of "Home Page" - which changed slug when an edit page was saved to the database.

Closes #145

* Removed unsupported AlterColumn migration.

Also unnecessary as Initial Create specifies column is nullable.

* Ensure migration history table gets created

* Fix up localization of ArticleNotFound page

* Localize PagerTagHelper as per #163

* fix issue when making changes to .cshtml files while debugging causes error

* UI Enhancements

* fix issue when making changes to .cshtml files while debugging causes error

* Fixed paginator logic errors (#162)

* MarkdownTagHelper to Encode, Parse and Sanitize (#165)

* MarkdownTagHelper to Encode, Parse and Sanitize

* Remove unsafe elements and attributes

* Feature authorization (#168)

* Started using EntityFramework SeedData

* Updated to 2.1.1 and added a Delete policy for articles

* Added an Authorization tag helper

* Added initial email notifications using SendGrid with Amanda Iverson

* Fix redirect in ConfirmationEmail.cshtml.cs file

* Add CanNotify flag to CoreWiki user and use that flag when deciding whether or not to send a notification regarding Commnets (GDPR compliance)

* Fixed migrations and layout of checkboxes

* updated checkbox on register.cshtml

Wrapped the checkbox in a form group so it has margin-bottom by default. See:
https://getbootstrap.com/docs/4.1/components/forms/#form-groups

* Expended on email notification featuer and added email templates, closes #149 (#157)

* UI Enhancements (#170)

* fix issue when making changes to .cshtml files while debugging causes error

* UI Enhancements

* Improve AntiForgery handling for CSRF protection (#178)

* Added global antiforgery token validation

* Remove antiforgery token on logout
Fixes #164

* Update Cake & run tests (#180)

* Update Cake & run tests

* Upgrade Cake to 0.28.1

* Execute tests

* Updated travis to SDK 2.1.301

* Project versions and ratings - Fixed #7 (#184)

* Upgrade package.json and _Layout.cshtml to point to Bootstrap 4.1.1

* Page Selector using a cookie and javascript

* Fix issue #56 by updating the new code to strip any unwanted characters rather than returning to the old method.

* Now resetting the page number when you change the page size

* Added gitattributes

* now ignoring vscode folder

* Fixed missing topic information to correct #54

* Now allowing edits to the topic name

* Added unit test and tuned UrlHelpers

* Removed indent-size as requested in #59

* Merged unit test projects

* Added ArticleHistory

* Incrementing version fixed

* Ignoring App_Data

* WIP - Attempting to seed ArticleHistory

* Fixed seed data issue for ArticleHistory (#172)

* Started work on the history page

* Completed diff functionality

* Completed the diff functionality

* Fix missing `<script>` tag (#186)

* Remove `App_Data` from .gitignore so new users can run the app (#185)

* Slug fixes (#187)

* Fixes cases where the slug is returned as blank
* Topic should not be converted to lower case before being sluggified (missing hyphens in slug)
    E.g. (HomePage became homepage instead of home-page_

* Adding initial Repository Folders

* Added Repositories and removed DBContexts

* Added readme to app_data to force it to download

* Renamed impls of IRepos specific to thier impls. Removed Context casts

* Updated nuget packages (#188)

* Refactored the Edit page to Repository pattern

* Refactored the references to ApplicationDbContext out of Startup

* Refactored the Migrations to the CoreWiki.Data project

* Removed "empty" migration

See #191

* Use static data to fix migration issue.

* Setup an MSBUILD Target

* Update README recordings list (#190)

* Corrected SeedData references and fixed nesting of migration files

* Refactored Notifications to their own project

* Added Razor package

* Added email templates

* Added Razor package

* Removed old template

* Implemented Razor templating

* Added required packages

* Added templates folder as embedded resource

* Fixed wrong template root folder

* Added razor view engine options to service collection

* Fixed issue with AppSettings

* Fixed issue with slow builds

* Upgrade Bootstrap to 4.1..2 (#196)

* Fixed reference to Hosting.Abstractions in Notifications

* Moved security data objects to the Data project

* Implemented ConfirmationEmail, ForgotPasswordEmail, refactoring of NotificationService

* Added CanNotifyUser Func

* Fixed email logo url

* Extension methods for cleaner startup (#195)

* Fixes #203 (#204)

* Added authorization policies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants