Showing posts with label html. Show all posts
Showing posts with label html. Show all posts

Friday, July 31, 2020

Link target _blank - Security Issue

La etiqueta html "a" tiene un atributo "target" y enter sus valores que puede recibir está "_blank" que es el que nos permitirá abrir la página html en una nueva ventana de tu browser. Eso seguramente ya lo sabías así como yo. Pero hoy, trabajando en un enhacemente que reportó mi equipo de QA, aprendí algo nuevo.

Que cuando estás ocupando el "_blank", por temas de seguridad necesitas poner rel="noopener noreferrer"

<a href="www.tupaginaaqui.com" target="_blankrel="noopener noreferrer">

rel="noopener " impide que la nueva página pueda acceder a la propiedad window.opener y asegura que se ejecuta en un proceso separado. Sin esto, la página de destino puede potencialmente redirigir su página a una URL maliciosa. 

rel="noreferrer" tiene el mismo efecto, pero también evita que el encabezado del Referido sea enviado a la nueva página. Eliminar el encabezado de referencia afectará al análisis.

Thursday, May 16, 2019

Input type file accepts MS presentations

In html5, input tag has a property called accept to filter the kind of files. If we want to filter just power point files, we should do something like as follow:


With this, we are filtering .ppt, pptx and ppsx

But there is a trick xD
Look at the next screenshot:




Easy, right?

Happy coding! :)


Friday, August 25, 2017

Agregar icono a un input

Keywords: input with icon, input font awesome, how to add icon into input



Ok, la idea es agregar un icono a un elemento html input tal como lo hacemos a un elemento anchor el cual es sencillo puesto que tiene etiqueta de cierre. Sin embargo, en el caso del input, que lo necesitamos por el submit, NO tiene un etiqueta de cierre. Podemos hacer lo siguiente:




La solución que yo empleo es el caso 2.
Para el caso 3, el link para sacar el UNICODE es el siguiente: http://fontawesome.io/cheatsheet/
Nota.- Los ejemplos mostrados han sido realizados utilizando Bootstrap 3 ó 4