-
Notifications
You must be signed in to change notification settings - Fork 281
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
Get rid of unnecessary safeHTML usage #135
Conversation
Ok, let's morph this pull request into a generic "Get rid of unnecessary safeHTML usage" - I'll add more commits to it for the other templates. The newer commits rely on the |
…ity unchanged, cannot test)
Note that the changes to feed generation get rid of |
Wow, thanks for the fix and reminder! |
I removed emitting whitespace as delimiter in |
Note that the markup generated by |
…, removed unnecessary safeHTML usage in home-posts.html
Same issue was on |
I had to change image autodetection regex in order to test the previous change properly - your regex doesn't allow for any additional attributes between |
I think I'm done here. Remaining
|
Actually, I reverted the change to the image autodetection regex - it's not worth it. The majority of users shouldn't have this issue, and I can change the order of attributes on my end. |
Awesome! 🎉 I’ll review this as soon as possible! Thank you for this great contribution! |
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.
Learned a lot! And here are some issues I want to mention.
I checked the source code and Btw, it seems that |
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.
Thank you!
Yes. I guess it may be because taxonomy terms in these two partials came from |
Seems everything's good now. I'll complete the following two todos,
then I'll merge this PR. |
Fixes reuixiy#134. * Simplify post-meta.html template logic * Fixed indentation in previous commit * Use icon.html template for zodiac icons in lists * Remove unnecessary safeHTML usage in footer.html (busuanzi functionality unchanged, cannot test) * Improved previous commit, no unnecessary markup for the copyright symbol * Remove unnecessary safeHTML usage in style.html * Use icon.html partial in the header * Remove unnecesary safeHTML usage in script.html * Removed unnecessary safeHTML usage in menu.html * Remove unnecessary safeHTML use in header.html * Use icon.html partial in back-to-top and port-share components * Use icon.html partial in related-posts and socials components * Remove unnecessary safeHTML use in feed generation * Simplify minimal-footer-about component * Removed safeHTML usage from post-updated-badge component * Remove unnecessary safeHTML usage in post-copyright component * Remove unnecessary safeHTML usage in post-nav component * Simplify minimal-footer component and remove safeHTML usage * Simplify post-tags component and remove safeHTML usage * Made summary.html produce its result directly rather than via scratch, removed unnecessary safeHTML usage in home-posts.html * Use icon.html partial on home-footage page * Remove unnecessary safeHTML usage on post.html page * Remove unnecessary safeHTML usage on home-poetry.html page * Remove unnecessary safeHTML usage from OpenGraph data * Remove unnecessary safeHTML usage from utils/list-item.html * Improve image autodetection regex and remove unnecessary unsafeHTML usage in images.html * Remove unnecessary safeHTML usage from relative-url.html * Remove unnecessary safeHTML usage in content.html * Revert image auto-detection changes, these aren't useful * Delete the missing line in post-share * Revert to using urls.Parse on tag and category names passed to .GetPage again * Fix error caused by wrong context in list.html * Replace hyphen with en dash * Remove unnecessary safeHTML usage in post-gitinfo.html * Remove unnecessary safeHTML usage of busuanzi in footer.html Co-authored-by: reuixiy <reuixiy@gmail.com>
This change fixes #134 for a single template - the only
safeHTML
call required here is moved into the newutils/icon.html
partial. While at it, a few things are simplified: