You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Today, using a relative URL in an Adaptive Card throws an exception while rendering.
In toasts, it makes sense for us to allow relative URLs to default to ms-appx:///, which is what other XAML surfaces allow, and what existing XML toasts allow. For example, "url": "Assets/Images/dog.jpg" rather than having to write "url": "ms-appx:///Assets/Images/dog.jpg"
This will throw on relative urls, since relative urls don't have a scheme. Therefore, this should be updated to...
AFTER (written in C#)
// If not an absolute uriif(!imageUri.IsAbsoluteUri){// Prefix the host config specified base url// Note that hostConfig.BaseUrl is a Uri object tooimageUri=newUri(hostConfig.BaseUrl,imageUri);}// Then continue with original code of getting scheme nameschemeName=imageUri.SchemeName;
The text was updated successfully, but these errors were encountered:
Implementation status
Today, using a relative URL in an Adaptive Card throws an exception while rendering.
In toasts, it makes sense for us to allow relative URLs to default to
ms-appx:///
, which is what other XAML surfaces allow, and what existing XML toasts allow. For example,"url": "Assets/Images/dog.jpg"
rather than having to write"url": "ms-appx:///Assets/Images/dog.jpg"
This requires a few pieces of work...
1. Updated host config
2. Object model code updated
This line of code needs to be updated to allow relative urls
BEFORE
AFTER (idk what the equivalent in C++ is, but this needs to parse a URL that's either relative or absolute, allowing a relative url to be assigned)
3. Renderer code updated
And then while rendering, this line of code needs to be updated to prefix the base url if the url is a relative url.
BEFORE
This will throw on relative urls, since relative urls don't have a scheme. Therefore, this should be updated to...
AFTER (written in C#)
The text was updated successfully, but these errors were encountered: