Minds/front

Links on homepage directing users to strange places

theunknownartisthour opened this issue · 2 comments

As Saz notes on: https://www.minds.com/newsfeed/644309925555613716
There are several places where links on minds are malformed:

In this instance it's pretty straightforward a relative path /p/ is being added in as /p%2f (where %2f is supposed to be a /) but somewhere along the way that doesn't get encoded, resulting in broken links, often to random profiles.

Some source code to look at:
https://github.com/Minds/front/blob/ecbcd58fd8ced29acc7e52db0e89c4d31cca7c87/app/src/controllers/home/homepage/homepage.html

Specifically look for 'm-footer-nav-item', there are a few that are like this.

A potential fix may be to remove the conditional section:

          <a *ngIf="page.path === '/P'" [routerLink]="['/P', {page: page.params.page }]" class="mdl-color-text--blue-grey-100">{{page.title}}</a>
          <a *ngIf="!page.path" [href]="page.params.page" target="_blank" class="mdl-color-text--blue-grey-100">{{page.title}}</a>

and just use

          <a [href]="page.params.page" target="_blank" class="mdl-color-text--blue-grey-100">{{page.title}}</a>

thanks this has already been resolved on the private repos. We can't use your suggested fix though as this will not allow the angular2 router to use dynamic routing and instead rely on new page redirects.

I figured as much, are the public repos kept relatively in sync with the private ones? All the documentation on angular2 makes it seem as if:

          <a *ngIf="page.path === '/P'" [routerLink]="['/P', {page: page.params.page }]" class="mdl-color-text--blue-grey-100">{{page.title}}</a>
          <a *ngIf="!page.path" [href]="page.params.page" target="_blank" class="mdl-color-text--blue-grey-100">{{page.title}}</a>

should work fine, which is why I suggested to use an absolute link.

I'm assuming the public one is further along in commits.