Currently, in the value field of the contact and rss platform only supports internal drupal paths. But sometimes the RSS feed is hosted externally (e.g. Feedburner).

CommentFileSizeAuthor
#2 allow-external-urls-2629844-2.patch800 bytesHiMyNameIsSeb
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

cbeier created an issue. See original summary.

HiMyNameIsSeb’s picture

I have this requirement also so have created a patch to allow users to add absolute URLs (URLs beginning with "http").

I have not updated the labels on the block form as doing so looks a little messy.

There might be a good reason why allowing absolute URLS is a bad idea that I have not considered. If so, let me know. Also, feel free to adapt the patch or feedback as necessary.

HiMyNameIsSeb’s picture

Priority: Normal » Minor
Status: Active » Needs review
PaulDinelle’s picture

I used this patch and it allowed for external URLs, so that's great!

My only criticism is that the form field's prefix is now confusing.

Recommendation is to:

  • Remove the prefix
  • Add a description note about the requirements for internal vs external URLs

Unfortunately I don't have time to reroll the patch at the moment, but here's an example message that could be used:

'<strong>Notes:</strong> <br/>Internal links must start the URL with a forward-slash (ex: /speaker-contact-form). <br/>External links must start with http:// or https://.'

(note the above code had the "code" html elements stripped out due to the WYSIWYG parser on Drupal.org.

Shriaas made their first commit to this issue’s fork.

Shriaas’s picture

I think better way would be to make RSS class extend Platform Base instead of Contact and not provide any prefix so RSS will accepts external URLs too.
Raised MR for same.