Merge pull request #6 from rparenton/see_photos_fix
Fix 'See Photos' link for hyphenated registrations
This commit is contained in:
commit
cde047aac3
|
@ -1378,7 +1378,7 @@ function getFlightAwareModeSLink(code, ident, linkText) {
|
|||
|
||||
function getFlightAwarePhotoLink(registration) {
|
||||
if (registration !== null && registration !== "") {
|
||||
return "<a target=\"_blank\" href=\"https://flightaware.com/photos/aircraft/" + registration.trim() + "\">See Photos</a>";
|
||||
return "<a target=\"_blank\" href=\"https://flightaware.com/photos/aircraft/" + registration.replace(/[^0-9a-z]/ig,'') + "\">See Photos</a>";
|
||||
}
|
||||
|
||||
return "";
|
||||
|
|
Loading…
Reference in a new issue