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

Character count should disregard markdown links #1207

Open
jrfnl opened this issue Jan 6, 2019 · 6 comments
Open

Character count should disregard markdown links #1207

jrfnl opened this issue Jan 6, 2019 · 6 comments

Comments

@jrfnl
Copy link

jrfnl commented Jan 6, 2019

Just encountered this on a site using OpenCfp, but I will admit I haven't tested this on the current source.
I did search the repo and couldn't find any related issues/PRs.

Steps required to reproduce the problem

  1. OpenCfp site with a 500 character limit for the speaker profile field with markdown enabled (to allow for links).
  2. Try to register as a new user with a speaker profile of 450 chars with three words using markdown link syntax [link](http://....) with the links being +/- 50 chars each.
  3. See the user registration being rejected with a message that the speaker profile text is too long (600 chars)

Expected Result

  • That links in markdown are not included in the character count as they will not lengthen the actual text being displayed.

Actual Result

  • Links in markdown are included in the character count.
@chartjes
Copy link
Contributor

chartjes commented Jan 7, 2019

@jrfnl That's...a very interesting problem to figure out how to solve. I imagine the solution is:

  • run the speaker profile text through some kind of Markdown-to-text convertor
  • verify the converted text is not greater that our limit

@jrfnl
Copy link
Author

jrfnl commented Jan 7, 2019

@chartjes That's along the same lines of what I was thinking. Does that mean you can confirm this is a OpenCfp issue and not an issue with that specific website ?

@chartjes
Copy link
Contributor

chartjes commented Jan 7, 2019 via email

@chartjes
Copy link
Contributor

@jrfnl I took a look at the User table in the current version of OpenCFP and the 'info' and 'bio' fields are actually TEXT fields with no preset limit. In the code that validates the speaker information I do not see anything that is limiting the size of either one of those fields.

Without knowing what version of OpenCFP they are running, I believe they added that extra validation step in.

@jrfnl
Copy link
Author

jrfnl commented Jan 14, 2019

@chartjes Thank you for looking into this.

As clearly some conferences apparently feel the need to add these kind of character limits (the wrong way), it might be an idea to offer this ability natively (the correct way) ?

If it helps, I can probably find out what version of OpenCFP they are running and possibly even get a link to a repo (if it's public). Let me know if you'd like me to chase that up.

@chartjes
Copy link
Contributor

@jrfnl Well, there is no limit at all since the database field is TEXT. Not much I can offer at OpenCFP's end

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