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

Support links in polls #12947

Open
Tracked by #21917
ghost opened this issue Aug 7, 2019 · 19 comments
Open
Tracked by #21917

Support links in polls #12947

ghost opened this issue Aug 7, 2019 · 19 comments
Labels
area: integrations help wanted new feature A proposed new feature for the product

Comments

@ghost
Copy link

ghost commented Aug 7, 2019

It'd be nice to, with the /poll feature, support markdown links in the poll option. This way you could include links to more information with the option.

@timabbott
Copy link
Sponsor Member

Yeah, this is very reasonable. The poll system is still a beta API; we'll definitely want to fix this when we rework it to something more stable.

@zulipbot
Copy link
Member

zulipbot commented Aug 8, 2019

Hello @zulip/server-integrations members, this issue was labeled with the "area: integrations" label, so you may want to check it out!

@timabbott
Copy link
Sponsor Member

The code for this is in static/js/poll_widget.js; I haven't done investigation into how that's rendered, but certainly in principle we could do markdown rendering on the submessage objects. Ideally we'd follow our policy of always doing such rendering on the backend.

@clarammdantas
Copy link
Collaborator

@zulipbot claim

@clarammdantas
Copy link
Collaborator

@zulipbot abandon

@aero31aero
Copy link
Member

The rendering logic is in zerver/lib/widgets.py. We have at least two ways to handle this:

  1. Implement support for []() style links only, in widgets.py.
  2. Create an instance of our markdown renderer that only runs InlineProcessors and we get things like Autolink, Emphasis, Strong etc all in one go.

Both these approaches could work by rendering a line/option at a time, because we already have an agreed upon method of extracting poll options from a message and each line's text is rendered in a button later.

@ubterko
Copy link
Collaborator

ubterko commented Oct 7, 2019

@zulipbot claim

@zulipbot
Copy link
Member

zulipbot commented Oct 17, 2019

Hello @Kkoderr, you have been unassigned from this issue because you have not updated this issue or any referenced pull requests for over 14 days.

You can reclaim this issue or claim any other issue by commenting @zulipbot claim on that issue.

Thanks for your contributions, and hope to see you again soon!

@ubterko
Copy link
Collaborator

ubterko commented Oct 18, 2019

I'm still working on this.

@ubterko
Copy link
Collaborator

ubterko commented Oct 22, 2019

@zulipbot claim

@ubterko
Copy link
Collaborator

ubterko commented Nov 1, 2019

@zulipbot unclaim

@Gittenburg Gittenburg added the new feature A proposed new feature for the product label Jul 10, 2020
@BhingaradiaNihar
Copy link
Collaborator

@zulipbot claim

@zulipbot
Copy link
Member

zulipbot commented Nov 9, 2020

Hello @BhingaradiaNihar, it looks like we've already sent you a collaboration invite at https://github.com/zulip/zulip/invitations, but you haven't accepted it yet!

Please accept the invite and try to claim this issue again afterwards. We look forward to your contributions!

@BhingaradiaNihar
Copy link
Collaborator

@zulipbot claim

@zulipbot
Copy link
Member

zulipbot commented Nov 9, 2020

Hello @BhingaradiaNihar, it looks like you've currently claimed 1 issue in this repository. We encourage new contributors to focus their efforts on at most 1 issue at a time, so please complete your work on your other claimed issues before trying to claim this issue again.

We look forward to your valuable contributions!

@zhark01
Copy link
Collaborator

zhark01 commented Nov 9, 2020

@zulipbot claim

@zulipbot
Copy link
Member

zulipbot commented Nov 9, 2020

Welcome to Zulip, @zhark01! We just sent you an invite to collaborate on this repository at https://github.com/zulip/zulip/invitations. Please accept this invite in order to claim this issue and begin a fun, rewarding experience contributing to Zulip!

Here's some tips to get you off to a good start:

As you work on this issue, you'll also want to refer to the Zulip code contribution guide, as well as the rest of the developer documentation on that site.

See you on the other side (that is, the pull request side)!

zhark01 added a commit to zhark01/zulip that referenced this issue Dec 5, 2020
The change was made to support links in polls, as mentioned in
issue zulip#12947. We used markdown renderer to render
the link content, and parsed out any unnecessary p tags.
We changed javascript and hbs files so that they properly
render the content. Tested locally whether the links work,
in addition to checking for XSS vulnerbilities.
Everything tested worked, and no vulnerabilities
discovered. Double check that there are no XSS
issues.

Fixes: zulip#12947
zhark01 added a commit to zhark01/zulip that referenced this issue Dec 5, 2020
The change was made to support links in polls, as mentioned in
issue zulip#12947. We used markdown renderer to render
the link content, and parsed out any unnecessary p tags.
We changed javascript and hbs files so that they properly
render the content. Tested locally whether the links work,
in addition to checking for XSS vulnerbilities.
Everything tested worked, and no vulnerabilities
discovered. Double check that there are no XSS
issues.

Fixes: zulip#12947
zhark01 added a commit to zhark01/zulip that referenced this issue Dec 5, 2020
The change was made to support links in polls, as mentioned in
issue zulip#12947. We used markdown renderer to render
the link content, and parsed out any unnecessary p tags.
We changed javascript and hbs files so that they properly
render the content. Tested locally whether the links work,
in addition to checking for XSS vulnerbilities.
Everything tested worked, and no vulnerabilities
discovered. Double check that there are no XSS
issues.

Fixes: zulip#12947
zhark01 added a commit to zhark01/zulip that referenced this issue Dec 5, 2020
The change was made to support links in polls, as mentioned in
issue zulip#12947. We used markdown renderer to render
the link content, and parsed out any unnecessary p tags.
We changed javascript and hbs files so that they properly
render the content. Tested locally whether the links work,
in addition to checking for XSS vulnerbilities.
Everything tested worked, and no vulnerabilities
discovered. Double check that there are no XSS
issues.

Fixes: zulip#12947
zhark01 added a commit to zhark01/zulip that referenced this issue Dec 5, 2020
The change was made to support links in polls, as mentioned in
issue zulip#12947. We used markdown renderer to render
the link content, and parsed out any unnecessary p tags.
We changed javascript and hbs files so that they properly
render the content. Tested locally whether the links work,
in addition to checking for XSS vulnerbilities.
Everything tested worked, and no vulnerabilities
discovered. Double check that there are no XSS
issues.

Fixes: #1294o7
zhark01 added a commit to zhark01/zulip that referenced this issue Dec 6, 2020
The change was made to support links in polls, as mentioned in
issue zulip#12947. We used markdown renderer to render
the link content, and parsed out any unnecessary p tags.
We changed javascript and hbs files so that they properly
render the content. Tested locally whether the links work,
in addition to checking for XSS vulnerbilities.
Everything tested worked, and no vulnerabilities
discovered. Double check that there are no XSS
issues.

Fixes: zulip#12947
zhark01 added a commit to zhark01/zulip that referenced this issue Dec 6, 2020
The change was made to support links in polls, as mentioned in
issue zulip#12947. We used markdown renderer to render
the link content, and parsed out any unnecessary p tags.
We changed javascript and hbs files so that they properly
render the content. Tested locally whether the links work,
in addition to checking for XSS vulnerbilities.
Everything tested worked, and no vulnerabilities
discovered. Double check that there are no XSS
issues.

Fixes: #1294o7
zhark01 added a commit to zhark01/zulip that referenced this issue Dec 8, 2020
The change was made to support links in polls, as mentioned in
issue zulip#12947. We used markdown renderer to render
the link content, and parsed out any unnecessary p tags.
We changed javascript and hbs files so that they properly
render the content. Tested locally whether the links work,
in addition to checking for XSS vulnerbilities.
Everything tested worked, and no vulnerabilities
discovered. Double check that there are no XSS
issues.

Fixes: zulip#12947
zhark01 added a commit to zhark01/zulip that referenced this issue Dec 8, 2020
The change was made to support links in polls, as mentioned in
issue zulip#12947. We used markdown renderer to render
the link content, and parsed out any unnecessary p tags.
We changed javascript and hbs files so that they properly
render the content. Tested locally whether the links work,
in addition to checking for XSS vulnerbilities.
Everything tested worked, and no vulnerabilities
discovered. Double check that there are no XSS
issues.

Fixes: zulip#12947
zhark01 pushed a commit to zhark01/zulip that referenced this issue Dec 8, 2020
The change was made to support links in polls, as mentioned in
issue zulip#12947. We used markdown renderer to render
the link content, and parsed out any unnecessary p tags.
We changed javascript and hbs files so that they properly
render the content. Tested locally whether the links work,
in addition to checking for XSS vulnerbilities.
Everything tested worked, and no vulnerabilities
discovered. Double check that there are no XSS
issues.

Fixes: zulip#12947
@zulipbot
Copy link
Member

Hello @zhark01, you claimed this issue to work on it, but this issue and any referenced pull requests haven't been updated for 10 days. Are you still working on this issue?

If so, please update this issue by leaving a comment on this issue to let me know that you're still working on it. Otherwise, I'll automatically remove you from this issue in 4 days.

If you've decided to work on something else, simply comment @zulipbot abandon so that someone else can claim it and continue from where you left off.

Thank you for your valuable contributions to Zulip!

@roanster007
Copy link
Collaborator

@zulipbot claim

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: integrations help wanted new feature A proposed new feature for the product
Projects
None yet
Development

No branches or pull requests

9 participants