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

Handle no topic link safely #75

Closed
anthonydillon opened this issue Jan 21, 2021 · 3 comments · Fixed by #87
Closed

Handle no topic link safely #75

anthonydillon opened this issue Jan 21, 2021 · 3 comments · Fixed by #87

Comments

@anthonydillon
Copy link
Contributor

anthonydillon commented Jan 21, 2021

Someone added a topic without a link:
Image Pasted at 2021-1-21 13-44

This topic should be parsed and ignored if it does not match minimum criteria.

This feature should be tested to ensure to have hardening for malformed tables content.

@anthonydillon anthonydillon changed the title Strip out comments safely Handle no topic link safely Jan 21, 2021
@nottrobin
Copy link
Contributor

@carkod
Copy link
Contributor

carkod commented Jan 22, 2021

I don't know if there is a generic way to do this. But the only way I can think of is a pretty herculean task... Because they could make any error anywhere, so will need to check every cell in the table and make sure:

  • URLs:
    • Start with https:// or It actually links to an existent discourse post
    • Path starts with /engage/ and contains a string with all lowercase, no numbers, no strange punctuation marks...
    • If the markdown is formatted correctly according to beautiful soup, so any missing brackets and parenthesis need to be checked.
  • Type needs to be a selection of items, namely webinar, blog, whitepaper, event...
  • Tags contain only text, with commas, no numbers or other punctuation marks.
  • Language matches a country code format matching our templates. So it must be a lowercase, no numbers, no punctuation marks string.
  • Active column needs to match either the string true or false.
  • Number of columns being added (if there is an additional pipe with empty content or not will displace the table)
  • Possible removal of headers in the table or existence of the selection of tables that are currently in place.
  • All of the above for takeovers too...

And if any of these does not happen return the errored index and finish the loop with an error?
And I am probably missing some more checks here...

@SirSamTumless
Copy link

What's happening with this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment