webappUrlPatterns does not work on multiple "radiofrance" sites

Bug #1556412 reported by Nicolas Delvaux
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
webbrowser-app (Ubuntu)
New
Undecided
Alexandre Abreu

Bug Description

Hi,

I do not manage to confine my webapp on its site, the "--webappUrlPatterns" just seems to be ignored.
I tested on Ubuntu 15.10 and on Mako (up-to-date rc-proposed).

Test case 1 (working):
Run "webapp-container --webappUrlPatterns=http://foo.org/* http://www.google.com/"
→ As expected, any link clicked on this page is opened in the Web browser (as no URL match the pattern)

Test case 2 (failure):
Run "webapp-container --webappUrlPatterns=http://foo.org/* http://www.fipradio.fr/player"
→ All URLs are opened in the webapp. I can go to twitter, facebook... anywhere.

I have the same issue on other Radio France sites, like:
* http://www.franceculture.fr/
* http://www.mouv.fr/
* http://www.francebleu.fr/

Strangely enough, everything seems to work on:
* http://www.francemusique.fr/
* http://www.franceinter.fr/

If it can help, I noticed strange things on http://www.franceinfo.fr/:
At the bottom of the page, the Twitter, Facebook and Dailymotion links are opened in the webapp whereas the "radiofrance.fr" link is opened in the web browser.

ProblemType: Bug
DistroRelease: Ubuntu 15.10
Package: webapp-container 0.23+15.10.20150929-0ubuntu1
ProcVersionSignature: Ubuntu 4.2.0-34.39-generic 4.2.8-ckt4
Uname: Linux 4.2.0-34-generic x86_64
ApportVersion: 2.19.1-0ubuntu5
Architecture: amd64
CurrentDesktop: Unity
Date: Sat Mar 12 12:36:31 2016
InstallationDate: Installed on 2015-10-19 (144 days ago)
InstallationMedia: Ubuntu 15.10 "Wily Werewolf" - Alpha amd64 (20151017)
SourcePackage: webbrowser-app
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Nicolas Delvaux (malizor) wrote :
Revision history for this message
Nicolas Delvaux (malizor) wrote :

Hmm, looking closer at it it seems all non-working links have the 'target="_blank"' attribute set.
So, is this a feature? Is there anyway to force these links to open in the browser?

Olivier Tilloy (osomon)
Changed in webbrowser-app (Ubuntu):
assignee: nobody → Alexandre Abreu (abreu-alexandre)
Revision history for this message
Olivier Tilloy (osomon) wrote :

From the webapp-container code, it seems like handling _blank target links in overlay webviews is the expected behaviour.
Alex, can you comment on this?

Revision history for this message
Nicolas Delvaux (malizor) wrote :

If it happens to be a feature, do you know of any way to inject javascript on a page, eg. to remove the _blank targets in question?
I don't think webapp-container is able to do that, but perhaps there is a more advanced container somewhere?

Revision history for this message
Alexandre Abreu (abreu-alexandre) wrote :

@Olivier & Nicolas: yes it is the expected behavior, all _blank target (and window.open'd "views") are opened inside the webapp and not dispatched to the default browser,

An option is planned to do the opposite (have external URL open in the webapp):

https://bugs.launchpad.net/ubuntu/+source/webbrowser-app/+bug/1548575

@Nicolas: you can definitely inject JS code from the container, I'll get back to you with an example,

Revision history for this message
Nicolas Delvaux (malizor) wrote :

@Alexandre: If you come by here again, I'm still interested by the way I could inject JS in webapp-container. It would really help if you could point me to a documentation or to an existing app source code :-)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.