-
Notifications
You must be signed in to change notification settings - Fork 308
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
Clean up #173
Clean up #173
Conversation
* Added image dimensions; * Added message to leave image alternate text always empty;
* Consistency;
* Removed unneeded mustache if;
* Consistency;
* Consistency;
* Consistency;
May we work towards HTML5 validation too? Any used |
I'm leaning towards -1 so far ... because of the
Strange nomenclature on that site too.. escaped isn't the same as HTML Entities. http://userscripts.org:8080/posts?kind=all&spam=1 result: Different results returned. 4396 page differences 😨 found between: result: Same visual results but definite source page differences... this implies that GH has special handlers for this unusual HTML Entity processing. I also seem to recall there is an alternate to |
encodeURIComponent("all&spam=1")
"all%26spam%3D1" |
@@ -15,7 +15,7 @@ | |||
<a href="/?flagged=true" class="list-group-item"> | |||
<i class="fa fa-fw fa-file-code-o"></i> <i class="fa fa-fw fa-flag"></i> Flagged Scripts | |||
</a> | |||
<a href="/?library=true&flagged=true" class="list-group-item"> | |||
<a href="/?library=true&flagged=true" class="list-group-item"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Flagged and library are separate query parameters. You don't escape them the & as it then becomes amp;flagged
= true
. Everywhere you've done this in this PR (inside a uri) is unnecessary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Flagged and library are separate query parameters.
Does this part mean you are pointing out a bug with both QSPs being in here or just the &
issue?
Seeing a few comments about encoding the ampersand entity ( To be clear, encoding entities doesn't have any effect to the link. You'll only see the The upside is in making better code & browsers will read it as it should have been (instead of fixing bad coding). Please comment. If people have a valid counter argument or strong opinion to not use it, I'm happy to undo all |
Aldo
What other elements are you referring to? |
Anything that I may have missed. This is the definitive source for HTML5 and no others... while there are a lot of opinions on the internet this is where it is all gathered and defined succinctly.
I vote we don't use HTML Entities in URI/URLs. As I stated already above authors will need to craft specifc 'cludes and handlers just to accommodate it. Your citations are random web pages for it too which aren't always correct as we've all seen... unfortunately I can't find much on the RFC back in the day when the proposal was drafted but I am still looking for it assuming it exists. If I am outvoted then with this change you must provide the URI/URL transformation handling routine for GM as well as OUJS.... Do you really want to do that? |
Please try it in your development branch. |
My bad, tried it on JSFiddle. TIL. Wondering if we need to user <script id="template" type="x-tmpl-mustache">
<a href="{{url}}">Escaped Link</a>
<a href="{{{url}}}">Unescaped Link</a>
</script> var template = $('#template').html();
Mustache.parse(template); // optional, speeds up future uses
var options = {
url: "https://openuserjs.org/?library=true&flagged=true",
};
var rendered = Mustache.render(template, options);
console.log(rendered); <a href="https://openuserjs.org/?library=true&flagged=true">Escaped Link</a>
<a href="https://openuserjs.org/?library=true&flagged=true">Unescaped Link</a> This might cause an annoyance with rendering the pagination widget, as we need to user the |
I'm still toward -1 for HTML Entities in
I couldn't get these to do anything different in some other issues during testing and could be related to #62 and Martii@aaab607 ... but perhaps my input data didn't need the change. IDK. |
I see no real advantage or reason to HTML entity escape query strings. |
Is it useful to continue with this PR? |
Well if you backout the |
I agree with @Martii. I want to merge this pull request, but I don't want the entities escaping on urls. |
* Consistency;
I've done all HTML pages I'm happy in cleaning up. Some pages require another review to get them valid. Ready for review or merge... |
Probably (e.g. recommend doing this one first and then those since they are less lines @sizzlemctwizzle) ... still zipping through your changes... just stopped in here to check for response. |
Yeah its a lot 😃 |
Alright... up to this point ya got a +1 from me :) Nice catches here... plus you saved me from doing this! GRIN The end of tabs I hope... at least in the html files. |
* Removed one unused variable;
I just added 2 commits for |
Done libs and models too. Now I'm completely done. Ready for review or merge... |
For reviewing... adding |
@@ -42,28 +42,33 @@ function getOAuthStrategies(stored) { | |||
} | |||
|
|||
// Allow admins to set user roles and delete users | |||
exports.userAdmin = function (req, res, next) { | |||
exports.userAdmin = function(req, res, next) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are getting rid of that space? Our style guide states that we put that space in there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oke missed that one. What do you guys want me to do?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please put the spaces back in for inline anonymous functions for now. I know this might be tedious and may need another check after merge.
Arggh... it says "We can't automatically merge this pull request." now. :\ |
I know. I've already had to do manual conflict resolution for the last pull request I merged. |
Did a merge of the upstream master branch. All fine now. |
…into hci Conflicts: app.js controllers/discussion.js controllers/group.js controllers/issue.js controllers/script.js controllers/scriptStorage.js controllers/user.js libs/markdown.js libs/modelParser.js views/includes/discussionList.html
Just did another merge of the upstream master branch to solve a lot of conflicts. Probably won't be doing that a third time. After this PR merge, I'll make another one to conform to the style guide. |
I'm doing some clean up to all files that need it. This mostly consists of validating the HTML and keep all files consistent.
It is still work in progress. I hope to finish it tomorrow.Finished.