Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

fix(ngSanitize): call attribute setter in linky for all links #14710

Merged
merged 1 commit into from
Jun 3, 2016

Conversation

Narretz
Copy link
Contributor

@Narretz Narretz commented Jun 3, 2016

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
bug fix

What is the current behavior? (You can also link to an open issue here)
Fixes #14707

Please check if the PR fulfills these requirements

Fixes #14707

@@ -141,6 +141,11 @@ angular.module('ngSanitize').filter('linky', ['$sanitize', function($sanitize) {
if (text == null || text === '') return text;
if (!isString(text)) throw linkyMinErr('notstring', 'Expected string but received: {0}', text);

var attributesFn =
isFunction(attributes) ? attributes :
isObject(attributes) ? function getAttributesObject() {return attributes} :
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't these be angular.isObject and angular.isFunction ?

@gkalpak
Copy link
Member

gkalpak commented Jun 3, 2016

LGTM (except for the helper function isXyz() --> angular.isXyz())
(And the CI failures of course 😃)

@Narretz Narretz force-pushed the fix-linky-attributes branch from f8a5b2f to 1b76a23 Compare June 3, 2016 10:25
@Narretz Narretz force-pushed the fix-linky-attributes branch from 1b76a23 to 6249934 Compare June 3, 2016 11:03
@Narretz Narretz merged commit 8e55b78 into angular:master Jun 3, 2016
gkalpak pushed a commit to gkalpak/angular.js that referenced this pull request Jun 3, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

attributes function parameter for linky only works for first link
3 participants